| FolderFind | Function (ROM Call 0x67)

vat.h

short FolderFind (SYM_STR SymName);

Checks whether a folder exists.

FolderFind searches for a folder SymName through the folder table in the VAT, and returns the following result:

- MAIN_FOLDER, if SymName is the "main" folder;
- FOLDER_TABLE, if a folder with name SymName exists;
- NOT_FOUND, if a folder with name SymName does not exists;
- BAD_FOLDER, if a symbol with name SymName is really present in the folder table, but does not represents a folder (i.e. folder bit is not set); this return value probably represents an invalid entry.

These constants are defined in enum FolderStats. See SYM_ENTRY for more info about structure of VAT entry, and SYMSTR for rules about SymName.

Uses: IsMainFolderStr, SymCmp, TokToStrN, _mu16u16
Used by: cmd_blddata, cmd_movevar, ROM Call 0x437