Folder system: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 2: Line 2:


{{syntaxhighlight|lang=python|code=  
{{syntaxhighlight|lang=python|code=  
import FolderManager
from pysweepme import FolderManager
FoMa = FolderManager.FolderManager()
FoMa = FolderManager.FolderManager()
print(FoMa.get_path("TEMP"))
print(FoMa.get_path("TEMP"))

Latest revision as of 18:35, 3 November 2023

SweepMe creates several folders at the first start which can be retrieved via the FolderManager:

from pysweepme import FolderManager
FoMa = FolderManager.FolderManager()
print(FoMa.get_path("TEMP"))

The above example initializes the FolderManager and prints out the path to the temp folder. Each folder is related to a certain string.

Key-Strings

  • "TEMP" = tempfolder in local OS user folder
  • "PUBLIC" = public SweepMe! folder of public operation system user
  • "ROAMING" = SweepMe! folder in roaming folder of current operation system user
  • "MAIN" = SweepMe!.exe installation folder
  • "CUSTOMDEVICES" = DeviceClasses in PUBLIC
  • "CALIBRATIONS" = Calibration folder in PUBLIC
  • "CUSTOM"= Custom files in PUBLIC
  • "EXTLIBS" = External libraries such as dlls in PUBLIC
  • "DATA" = measurement data folder

Please note that the above keys only work properly in SweepMe!. If used with pysweepme, some of them fail because MAIN is incorrect.