0385 wrote:
i'm not a coder, But if you want one specific line, Can't you use the ini file and have the line be a value and you call it with the key?
Maybe use sections to have different subjects.
Then it doesn't need to read the whole file. Just grab value from key.
Yes (it'll work only with a ini file, not any text file)
0385 wrote:
Doti, is there a reason why you didnt define the file name at the start when writing to the file but only later in the store bit?
Not really, I think it works anyway, like this :
Code:
//write 2 lines in a section
def fo = new org.ini4j.Wini(new File("test.ini"))
fo.put("section1", "key1", "value1")
fo.put("section1", "key2", "value2")
fo.store()