API Reference
LocalFileWorkspace
Provides constrained local browse, copy, and download-planning operations over allowed filesystem roots.
Inheritance
- Object
- LocalFileWorkspace
Constructors
public LocalFileWorkspace(IEnumerable<String> allowedRoots = null) #Creates a new workspace using the provided allowed roots, or the system drive when none are specified.
Parameters
- allowedRoots System.Collections.Generic.IEnumerable{System.String} = null
- Explicit allowed roots. When null or empty, the system drive root is used.
LocalFileWorkspace(ComputerX.FileSystem.LocalFileWorkspaceOptions allowedRoots) #Creates a new workspace using explicit options for allowed roots and fallback behavior.
Parameters
- allowedRoots ComputerX.FileSystem.LocalFileWorkspaceOptions
Methods
public FileWorkspaceBrowseResult Browse(String path) #FileWorkspaceBrowseResultBrowses the workspace roots or a specific allowed directory path.
Parameters
- path System.String
public FileWorkspaceCopyResult Copy(FileWorkspaceCopyRequest request) #FileWorkspaceCopyResultCopies an allowed file or directory within the workspace.
Parameters
- request ComputerX.FileSystem.FileWorkspaceCopyRequest
public static LocalFileWorkspace ForAllReadyDrives() #LocalFileWorkspaceCreates a workspace that exposes every ready drive on the current machine.
public static LocalFileWorkspace ForExplicitRoots(IEnumerable<String> allowedRoots) #LocalFileWorkspaceCreates a workspace that exposes only the provided explicit roots.
Parameters
- allowedRoots System.Collections.Generic.IEnumerable{System.String}
public static LocalFileWorkspace ForSystemDrive() #LocalFileWorkspaceCreates a workspace that exposes only the current system drive.
public static String[] ResolveAllowedRoots(IEnumerable<String> configuredRoots) #String[]Normalizes configured roots or falls back to the system drive when no roots are provided.
Parameters
- configuredRoots System.Collections.Generic.IEnumerable{System.String}
public static String[] ResolveAllowedRoots(IEnumerable<String> configuredRoots, FileWorkspaceRootFallback fallback) #String[]Normalizes configured roots or falls back according to the requested strategy.
Parameters
- configuredRoots System.Collections.Generic.IEnumerable{System.String}
- fallback ComputerX.FileSystem.FileWorkspaceRootFallback
public Boolean TryPrepareDownload(String path, out FileWorkspaceDownloadPlan descriptor, out String error) #BooleanAttempts to build a download/export plan for an allowed file or directory.
Parameters
- path System.String
- descriptor ComputerX.FileSystem.FileWorkspaceDownloadPlan@
- error System.String@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public IReadOnlyList<String> AllowedRoots { get; } #Gets the normalized allowed roots for the workspace.