[Main]
Name=directorylist
Type=Function
Header=calc_int.h
Definition=int (*directorylist) (@TNode@ ** tree, @uint32_t@ * memory);

[Parameters]
tree : the address of TNode pointer.
memory : the memory free or used.
Returns : 0 if successful, an error code otherwise.

[Summary]
Do a directory listing.

[Description]
This function requests to the calculator the list of all variables, folders and FLASH applications.

The tree has the following format:
root (NULL)
 +- variables (NULL)
 |  |
 |  +- folder1 (TiVarEntry)
 |  |  |
 | | +- variable1 (TiVarEntry)
 |  |
 |  +- folder2 (TiVarEntry)
 |
 +- applications (NULL)
    |
    +- app1 (TiVarEntry)

The interpretation of the tree depends on the has_folder field of the TicalcFunctions structure. Some calcs does not have folder. In this case, the structure is the same but the TiVarEntry is set to NULL, like the applications & variables nodes.

According to the memory field, the memory variable can returns either the memory free, either the memory used (or an approximation of this).

Note: this function should be replaced by @directorylist2@...

[See also]
@TicalcFunctions@, TNode, @TicalcMemoryType@

