Repository class

Available extensions

Constructors

Repository(Client client, RepositoryHandle handle)

Properties

client → Client
final
events → Stream<void>

Available on Repository, provided by the RepositoryExtension extension

Stream of repository notification events
no setter
handle → RepositoryHandle
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stateMonitor → Future<StateMonitor>

Available on Repository, provided by the RepositoryExtension extension

no setter

Methods

close() → Future<void>
Closes the repository.
createDirectory(String path) → Future<void>
Creates a new directory at the given path in the repository.
createFile(String path) → Future<File>
Creates a new file at the given path in the repository.
createMirror(String host) → Future<void>
Creates mirror of this repository on the given cache server host.
delete() → Future<void>
Delete the repository
deleteMirror(String host) → Future<void>
Deletes mirror of this repository from the given cache server host.
export(String outputPath) → Future<String>
Export repository to file
fileExists(String path) → Future<bool>
getAccessMode() → Future<AccessMode>
Returns the access mode (blind, read or write) the repository is currently opened in.
getBlockExpiration() → Future<Duration?>
getCredentials() → Future<List<int>>
Gets the current credentials of this repository. Can be used to restore access after closing and reopening the repository.
getEntryType(String path) → Future<EntryType?>
Returns the type of repository entry (file, directory, ...) or None if the entry doesn't exist.
getExpiration() → Future<Duration?>
getInfoHash() → Future<String>
Return the info-hash of the repository formatted as hex string. This can be used as a globally unique, non-secret identifier of the repository.
getMetadata(String key) → Future<String?>
getMountPoint() → Future<String?>
getPath() → Future<String>
getQuota() → Future<QuotaInfo>
getShortName() → Future<String>
getStats() → Future<Stats>
getSyncProgress() → Future<Progress>
Returns the synchronization progress of this repository as the number of bytes already synced (Progress.value) vs. the total size of the repository in bytes (Progress.total).
isDhtEnabled() → Future<bool>
Is Bittorrent DHT enabled?
isPexEnabled() → Future<bool>
Is Peer Exchange enabled?
isSyncEnabled() → Future<bool>
Returns whether syncing with other replicas is enabled for this repository.
mirrorExists(String host) → Future<bool>
Checks if this repository is mirrored on the given cache server host.
mount() → Future<String>
move(String dst) → Future<void>
moveEntry(String src, String dst) → Future<void>
Moves an entry (file or directory) from src to dst.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openFile(String path) → Future<File>
Opens an existing file at the given path in the repository.
readDirectory(String path) → Future<List<DirectoryEntry>>
Returns the entries of the directory at the given path in the repository.
removeDirectory(String path, bool recursive) → Future<void>
Removes the directory at the given path from the repository. If recursive is true it removes also the contents, otherwise the directory must be empty.
removeFile(String path) → Future<void>
Removes (deletes) the file at the given path from the repository.
resetAccess(ShareToken token) → Future<void>
setAccess({AccessChange? read, AccessChange? write}) → Future<void>
Sets, unsets or changes local secrets for accessing the repository or disables the given access mode.
setAccessMode(AccessMode accessMode, LocalSecret? localSecret) → Future<void>
Switches the repository to the given access mode.
setBlockExpiration(Duration? value) → Future<void>
setCredentials(List<int> credentials) → Future<void>
Sets the current credentials of the repository.
setDhtEnabled(bool enabled) → Future<void>
Enables/disabled Bittorrent DHT (for peer discovery).
setExpiration(Duration? value) → Future<void>
setMetadata(List<MetadataEdit> edits) → Future<bool>
setPexEnabled(bool enabled) → Future<void>
Enables/disables Peer Exchange (for peer discovery).
setQuota(StorageSize? value) → Future<void>
setSyncEnabled(bool enabled) → Future<void>
Enabled or disables syncing with other replicas.
share({required AccessMode accessMode, LocalSecret? localSecret}) → Future<ShareToken>
Creates a share token to share this repository with other devices.
toString() → String
A string representation of this object.
override
unmount() → Future<void>

Operators

operator ==(Object other) → bool
The equality operator.
override