GetDataFolder
GetDataFolder (mode [, dfr])
The GetDataFolder function returns a string containing the name of or full path to the current data folder or, if dfr is present, the specified data folder.
GetDataFolderDFR is preferred.
Parameters
If mode =0, it returns just the name of the data folder.
If mode =1, GetDataFolder returns a string containing the full path to the data folder.
dfr , if present, specifies the data folder of interest.
Details
GetDataFolder can be used to save and restore the current data folder in a procedure. However GetDataFolderDFR is preferred for that purpose.
Examples
String savedDataFolder = GetDataFolder(1) // Save
SetDataFolder root:
Variable/G gGlobalRootVar
SetDataFolder savedDataFolder // and restore