Class AndroidPathHelper
Utility for providing commonly used Android base paths like cacheDir, filesDir, etc.
public sealed class AndroidPathHelper
- Inheritance
-
objectAndroidPathHelper
Properties
CacheDirectory
The application's cache directory (context.cacheDir).
public string CacheDirectory { get; }
Property Value
- string
Exceptions
- PlatformNotSupportedException
Thrown if this property is accessed on a runtime other than Android.
ExternalCacheDirectory
The application's external cache directory (context.externalCacheDir).
public string? ExternalCacheDirectory { get; }
Property Value
- string
Exceptions
- PlatformNotSupportedException
Thrown if this property is accessed on a runtime other than Android.
ExternalFilesDirectory
The application's external directory for persistent files (from context.getExternalFilesDir).
public string? ExternalFilesDirectory { get; }
Property Value
- string
Exceptions
- PlatformNotSupportedException
Thrown if this property is accessed on a runtime other than Android.
FilesDirectory
The application's directory for persistent files (context.filesDir).
public string FilesDirectory { get; }
Property Value
- string
Exceptions
- PlatformNotSupportedException
Thrown if this property is accessed on a runtime other than Android.
Methods
GetExternalFilesDirectory(string?)
Gets the application's external directory for persistent files (from context.getExternalFilesDir).
public static string? GetExternalFilesDirectory(string? type = null)
Parameters
typestring
Returns
- string
Exceptions
- PlatformNotSupportedException
Thrown if this method is called on a runtime other than Android.