Skip to content

The "VFS" object

In all event-handlers that fire after a user has successfully logged in and accessed at least its own Home-VFS, the following line of code returns a VFS object:

ts
var vfs = Session.GetCurrentVFS();

This object's methods are defined as follows:

ts
class VirtualFileSystem {
  Name:             string;
  Type:             string;
  Target:           string;
  TargetPayload:    string;
  Encrypt:          boolean;
  function GetID(): string;                           // Returns the VFS ID as a string
  function ImportFile(localFile, vfsPath: string);    // Imports a file from the local file-system into the VFS
  function ExportFile(vfsFilePath, localDir :string); // Exports a file from the VFS to the local file-system
}

All of the above methods return read-only property values. It's not allowed to edit, change, or otherwise modify a user account inside of a script. This object is provided for informational purposes.