Is there an identified that i can call to determine if a specific section is in a file?
I know there is a command to determine if a topic is in a file, but i want to konw if there is a specfic section is in the file.
A topic is a section.
if ($ini(<file>,<topic>)) { ... }
if ($ini(<file>,<topic>,<item>)) { ... }
yes, and it works fine if there is the specified setion. Example:
file.ini
[Section]
data=stuff
if i do $ini(file.ini,Section,data) it will return '1' like its supose to.
if i do $ini(file.ini,Section,data2) it returns 'insufficient parameters' (using a //echo -a)
Should it return '0' if the section does not exsist instead of just erroring out? Im trying to write a script that requires that ability to know if the section does NOT exsist, not if its already there.
you can do something like
if !$ini(file.ini,Section,data2) { echo -a data2 doesn't exist }