ChannelContentSource class
An OmnyDrive ContentSource backed by a node-side path reached over a drive
session.
Each operation becomes a DriveRpcClient call: the node executes it against its local filesystem and streams back the result. This lets OmnyDrive's directory synchronizer treat a remote node path exactly like a local one, with no transport-specific logic in the engine.
Constructors
- ChannelContentSource(DriveRpcClient _rpc, {bool isWritable = false})
-
Wraps
rpc;isWritablereflects the mount's access mode (the node also enforces it).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isWritable → bool
-
Whether this source permits writes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copy(
String fromPath, String toPath, ContentHash expectedHash) → Future< bool> -
Copies the file at
fromPathtotoPathwithin this source, reusing the bytes already present — but only after verifying thatfromPathstill hashes toexpectedHash. -
delete(
String relativePath) → Future< void> -
Deletes the file at
relativePathif it exists. -
manifest(
) → Future< FileManifest> -
Builds the current
FileManifestfor the source tree. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBytes(
String relativePath) → Future< List< int> > -
Reads the bytes of the file at
relativePath. -
supportsCopy(
) → Future< bool> - Whether this source can copy an existing file to another path in place, without re-sending its bytes. May perform a one-time capability probe, so callers should await and cache the result for the duration of a transfer.
-
toString(
) → String -
A string representation of this object.
inherited
-
writeBytes(
String relativePath, List< int> bytes, {void onProgress(int sent, int total)?}) → Future<void> -
Writes
bytestorelativePath, creating parents as needed. Throws if the source is read-only.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited