Table of Contents

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

StorageFolder

The type representing a storage folder.

StorageFile

The 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

value string

The text to append.

storageFile StorageFile

The storage file to append to.

Returns

Task

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

appFolders AppFolders

The application folder category.

fileName string

The 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

content string

The text content to save.

storageFile StorageFile

The storage file to save to.