5.6.3 Internal directories: NewFold SetFold GetFold DelFold VARS
You can create a directory that isn’t actually on your hard drive but
is treated like one by Xcas with the command
NewFold.
-
NewFold takes one argument:
MyIntDir, a variable name (see Section 5.4.1).
- NewFold(MyIntDir)
creates a new internal directory named MyIntDir.
(Note that quotation marks are not used.)
Internal directories will be listed with the VARS() command
(see Section 5.4.9).
To actually use this directory, you’ll have to use the
SetFold command.
-
The SetFold command takes one argument:
MyIntDir, the variable name of an internal directory created with
NewFold.
- SetFold(MyIntDir)
makes MyIntDir the working directory (see Section 5.6.1).
Finally, you can print out the internal directory that you are in with
the GetFold command.
-
GetFold takes no arguments.
- GetFold() returns the name of the current internal
directory.
Example.
Input:
GetFold()
will display the current internal directory.
The DelFold command will delete an internal directory.
-
DelFold takes one argument:
MyIntDir, the variable name of an internal directory.
- DelFold(MyIntDir) will delete the directory
if it is empty.