Vixen
02b45cc4
csharp
public interface IFileSystemHost

Where this platform keeps things, and what it will let us do there.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The paths here are native, and they are the only native paths engine code ever sees. MountStandardLocations turns them into the mounts from MountPoints, and from that moment everything above speaks /app, /data, /cache and /temp — which is what lets the same code read from a directory on a desktop, an APK on Android, a signed bundle on iOS and an HTTP fetch in a browser.

Getting these four locations right is more of the platform's work than it looks. Data on Windows is %APPDATA% but on Linux is $XDG_DATA_HOME with a fallback, on macOS is ~/Library/Application Support, and on iOS must be the directory the OS backs up — while cache must be one it is allowed to delete, or the app is rejected for storing reconstructible data in the wrong place.

Fields and properties (5)

  • string ApplicationDirectory

    The read-only location the application's shipped content lives in.

  • string DataDirectory

    The read-write location for data that must survive a restart.

  • string CacheDirectory

    The read-write location for data the platform may delete at any time.

  • string TemporaryDirectory

    The read-write location for scratch data that need not survive the session.

  • bool IsSandboxed

    Whether the platform confines the process to those directories.

Methods (2)

  • void MountStandardLocations(VirtualFileSystem fileSystem)

    Mounts /app, /data, /cache and /temp onto this platform's providers.

  • ValueTask<bool> RequestPermissionAsync(PermissionKind permission, CancellationToken cancellationToken = default(CancellationToken))

    Asks the user for a permission, if this platform has one to ask for.

Used by (12)

  • AppBuilderVixen.App.Hosting
  • DesktopPlatformVixen.Platform.Desktop
  • DesktopPlatformOptionsVixen.Platform.Desktop
  • HeadlessLifecycleTestsVixen.Platform.Headless.Tests
  • HeadlessPlatformVixen.Platform.Headless
  • HeadlessPlatformOptionsVixen.Platform.Headless
  • IPlatformVixen.Platform
  • StandardFileSystemHostVixen.Platform
  • TemporaryFileSystemHostVixen.Platform.Headless.Tests
  • EditorHostVixen.Editor.Host
  • ProgramVixen.Editor.Host
  • TemporaryFileSystemHostVixen.App.Tests