| FolderDel | Function (ROM Call 0x66*)

vat.h

short FolderDel (SYM_STR SymName);

Deletes a folder, including all files in it.

FolderDel deletes the folder SymName including all files in it, and returns TRUE if the operation was successful, else returns FALSE (e.g. if the folder is not found). See SYMSTR for rules about SymName. If the folder SymName is the current folder, the new current folder after deleting will become the "main" folder. If the folder SymName is "main", then all symbols from it will be deleted, but the folder itself will remain intact. Beware that this routine will delete all symbols in the folder even if they are locked, in use, or archived!
Note: This function was buggy in TIGCCLIB releases prior to 2.3. I didn't know that the original TIOS entry called "FolderDel" requires in fact two parameters: another one is a Boolean flag. As this parameter was not passed before, the behaviour of this routine was random (see also FolderClear). Now, to keep the compatibility with already written programs, I modified FolderDel to always pass FALSE as an extra parameter (in this case, FolderDel behaves as described above; when it is TRUE, FolderDel behaves as FolderClear).

Uses: IsMainFolderStr, SymCmp, TokToStrN, HeapFree, HeapRealloc, ER_catch, ER_success, ER_throwVar, next_expression_index, push_parse_text, top_estack, EM_abandon, memmove, strcat, strchr, OSDisableBreak, OSEnableBreak, CheckGraphRef, statFree, _mu16u16, _ds32s32
Used by: FolderDelAllTemp, FolderDelTemp, cmd_blddata, handleVarLinkKey, LIO_Receive, OSLinkCmd, gr_del_vars_in_folder, gr_DelFolder

See also: FolderClear