SftpFileWriter class

Holds the state of a streaming write operation from stream to file.

Mixed-in types
Available extensions

Constructors

SftpFileWriter(SftpFile file, Stream<Uint8List> stream, int offset, dynamic onProgress(int bytes)?)
Creates a new SftpFileWriter. The upload process is started immediately after construction.

Properties

done Future<void>
A Future that completes when:
no setteroverride
file SftpFile
The remote file to write to.
final
hashCode int
The hash code for this object.
no setterinherited
offset int
The offset in file to start writing to.
final
onProgress → dynamic Function(int bytes)?
Called when bytes of data have been successfully written to file.
final
progress int
The number of bytes that have been successfully written to file.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<Uint8List>
The stream of data to write to file.
final
toJS JSPromise<T>

Available on Future<T>, provided by the FutureOfJSAnyToJSPromise extension

A JSPromise that either resolves with the result of the completed Future or rejects with an object that contains its error.
no setter
toJS JSPromise<JSAny?>

Available on Future<void>, provided by the FutureOfVoidToJSPromise extension

A JSPromise that either resolves once this Future completes or rejects with an object that contains its error.
no setter

Methods

abort() Future<void>
Stops stream from emitting more data. Returns a Future that completes when the underlying data source of stream has been successfully closed.
asStream() Stream<void>
Creates a Stream containing the result of this future.
inherited
catchError(Function onError, {bool test(Object error)?}) Future<void>
Handles errors emitted by this Future.
inherited
ignore() → void

Available on Future<T>, provided by the FutureExtensions extension

Completely ignores this future and its result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError<E extends Object>(FutureOr<T> handleError(E error, StackTrace stackTrace), {bool test(E error)?}) Future<T>

Available on Future<T>, provided by the FutureExtensions extension

Handles errors on this future.
pause() → void
Pauses stream from emitting more data. It's safe to call this even if the stream is already paused. Use resume to resume the operation.
resume() → void
Resumes stream after it has been paused. It's safe to call this even if the stream is not paused. Use pause to pause the operation.
then<S>(FutureOr<S> onValue(void), {Function? onError}) Future<S>
Register callbacks to be called when this future completes.
inherited
timeout(Duration timeLimit, {FutureOr<void> onTimeout()?}) Future<void>
Stop waiting for this future after timeLimit has passed.
inherited
toString() String
A string representation of this object.
inherited
whenComplete(FutureOr action()) Future<void>
Registers a function to be called when this future completes.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited