Table of Contents

Class FileManagerLocalStorage

Namespace
PowerSync.Common.Attachments
Assembly
PowerSync.Common.dll

Default ILocalStorageAdapter backed by System.IO. Files are written under AttachmentsDirectory.

public sealed class FileManagerLocalStorage : ILocalStorageAdapter
Inheritance
FileManagerLocalStorage
Implements
Inherited Members

Constructors

FileManagerLocalStorage(string)

Creates a FileManagerLocalStorage that stores files under attachmentsDirectory. The directory is created on InitializeAsync().

Properties

AttachmentsDirectory

Gets the directory under which attachment files are stored.

Methods

ClearAsync()

Clears all files in the storage.

CreateDirectoryAsync(string)

Creates a directory at the specified path. No-ops if it already exists.

DeleteFileAsync(string)

Deletes the file at the given path. No-ops if the file doesn't exist.

FileExistsAsync(string)

Checks if a file exists at the given path.

GetLocalUri(string)

Returns the file path for the provided filename in the storage directory.

InitializeAsync()

Initializes the storage adapter (e.g., creating necessary directories).

ReadFileAsync(string)

Opens a file for streaming reads.

RemoveDirectoryAsync(string)

Removes a directory and all its contents at the specified path.

SaveFileAsync(string, Stream)

Saves a stream to a local file.