public interface IFileSystemHostWhere 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 ApplicationDirectoryThe read-only location the application's shipped content lives in.
string DataDirectoryThe read-write location for data that must survive a restart.
string CacheDirectoryThe read-write location for data the platform may delete at any time.
string TemporaryDirectoryThe read-write location for scratch data that need not survive the session.
bool IsSandboxedWhether 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