[Main]
Name=FolderOp
Type=Function
Subtype=ROM Call
Header Files=vat.h
Definition=short FolderOp (SYM_STR SymName, short Flags);

[ROM Call]
Index=$69

[Description]
Locks or unlocks a folder table.

[Explanation]
FolderOp locks or unlocks a folder table which name is determined by <I>SymName</I>.
Returns <A HREF="$$LINK(alloc.h/Bool)">TRUE</A> if the operation was successful, else returns <A HREF="$$LINK(alloc.h/Bool)">FALSE</A>.
Parameter <I>Flags</I> may have following values (these constants are defined in
enum <A HREF="$$LINK(FolderOpFlags)">FolderOpFlags</A>):
<BR><BR>
<TABLE BORDER CELLPADDING="5">
<TR><TD VALIGN="TOP">FOP_UNLOCK</TD><TD>Unlocks a folder table</TD></TR>
<TR><TD VALIGN="TOP">FOP_LOCK</TD><TD>Locks a folder table</TD></TR>
<TR><TD VALIGN="TOP">FOP_ALL_FOLDERS</TD><TD>Locks/unlocks all folder tables (<I>SymName</I> is ignored);
this value should be ORed with one of FOP_UNLOCK or FOP_LOCK</TD></TR>
</TABLE>
<BR>
By locking the folder table, you may be sure that a dereferenced pointer to the table
will remain valid even after a lot of heap memory allocations (i.e. a garbage collection
will not move the table through memory).
<BR><BR>
<B>Note:</B> To lock the "home" folder (this is a pseudo-folder which contains all other folders in
itself, i.e. this is the table of folders), you need to know that its name consists only of the
character with code 0x7F (diamond). So, you can use
<PRE>FolderOp (SYMSTR ("\x7F"), FOP_LOCK);
</PRE>
to do this.

[References]
In=dialogs.h/VarOpen, events.h/EV_defaultHandler, homescr.h/HomeExecute, menus.h/VarCreateFolderPopup
Out=SymCmp, TokToStrN, alloc.h/HeapLock, alloc.h/HeapUnlock, string.h/strcmp, unknown.h/_mu16u16
