Class AppDataAppsAbstractBase<StorageFolder, StorageFile>
- Namespace
- SunamoPlatformUwpInterop.AppData
- Assembly
- SunamoPlatformUwpInterop.dll
Abstract base class for UWP/UAP application data management. This class provides methods that are applied only on UAP, while AppDataAbstractBase provides methods only for desktop.
public abstract class AppDataAppsAbstractBase<StorageFolder, StorageFile> : AppDataBase<StorageFolder, StorageFile>, IAppDataBase<StorageFolder, StorageFile>
Type Parameters
StorageFolderThe type representing a storage folder.
StorageFileThe type representing a storage file.
- Inheritance
-
AppDataBase<StorageFolder, StorageFile>AppDataAppsAbstractBase<StorageFolder, StorageFile>
- Implements
-
IAppDataBase<StorageFolder, StorageFile>
- Inherited Members
- Extension Methods
Methods
AppendAllText(string, StorageFile)
Appends text content to the specified storage file.
public abstract Task AppendAllText(string value, StorageFile storageFile)
Parameters
valuestringThe text to append.
storageFileStorageFileThe storage file to append to.
Returns
GetFile(AppFolders, string)
Gets the file path for the specified file in the given application folder. Automatically creates the parent folder if it does not exist.
public abstract StorageFile GetFile(AppFolders appFolders, string fileName)
Parameters
appFoldersAppFoldersThe application folder category.
fileNamestringThe file name.
Returns
- StorageFile
The storage file path.
GetRootFolder()
Gets the root folder for the application.
public abstract StorageFolder GetRootFolder()
Returns
- StorageFolder
The root folder.
IsRootFolderNull()
Checks whether the root folder is null or empty.
public abstract bool IsRootFolderNull()
Returns
- bool
True if the root folder is null or empty; otherwise false.
IsRootFolderOk()
Checks whether the root folder exists in the file system. If rootFolder is empty or null, returns false.
public abstract bool IsRootFolderOk()
Returns
- bool
True if the root folder exists; otherwise false.
SaveFile(string, StorageFile)
Saves the specified content to the given storage file.
protected abstract void SaveFile(string content, StorageFile storageFile)
Parameters
contentstringThe text content to save.
storageFileStorageFileThe storage file to save to.