Lines Matching refs:code

21 /// underlying filesystem, the function fails with `error-code::not-permitted`.
99 /// would permit any of those, shall fail with `error-code::read-only` if
184 enum error-code {
301 /// May fail with an error-code describing why the file cannot be read.
308 read-via-stream: func(offset: filesize) -> result<input-stream, error-code>;
311 /// May fail with an error-code describing why the file cannot be written.
316 write-via-stream: func(offset: filesize) -> result<output-stream, error-code>;
319 /// May fail with an error-code describing why the file cannot be appended.
324 append-via-stream: func() -> result<output-stream, error-code>;
329 advise: func(offset: filesize, length: filesize, advice: advice) -> result<_, error-code>;
337 sync-data: func() -> result<_, error-code>;
345 get-flags: func() -> result<descriptor-flags, error-code>;
357 get-type: func() -> result<descriptor-type, error-code>;
363 set-size: func(size: filesize) -> result<_, error-code>;
370 …ess-timestamp: new-timestamp, data-modification-timestamp: new-timestamp) -> result<_, error-code>;
379 /// In the future, this may change to return a `stream<u8, error-code>`.
383 read: func(length: filesize, offset: filesize) -> result<tuple<list<u8>, bool>, error-code>;
390 /// In the future, this may change to take a `stream<u8, error-code>`.
394 write: func(buffer: list<u8>, offset: filesize) -> result<filesize, error-code>;
405 read-directory: func() -> result<directory-entry-stream, error-code>;
413 sync: func() -> result<_, error-code>;
418 create-directory-at: func(path: string) -> result<_, error-code>;
429 stat: func() -> result<descriptor-stat, error-code>;
438 stat-at: func(path-flags: path-flags, path: string) -> result<descriptor-stat, error-code>;
446 …ess-timestamp: new-timestamp, data-modification-timestamp: new-timestamp) -> result<_, error-code>;
449 /// Fails with `error-code::no-entry` if the old path does not exist,
450 /// with `error-code::exist` if the new path already exists, and
451 /// `error-code::not-permitted` if the old path is not a file.
455 …, old-path: string, new-descriptor: borrow<descriptor>, new-path: string) -> result<_, error-code>;
460 /// `open-at` fails with `error-code::read-only`.
465 /// `error-code::read-only`.
469 … path: string, open-flags: open-flags, %flags: descriptor-flags) -> result<descriptor, error-code>;
473 /// filesystem, this function fails with `error-code::not-permitted`.
477 readlink-at: func(path: string) -> result<string, error-code>;
480 /// Return `error-code::not-empty` if the directory is not empty.
484 remove-directory-at: func(path: string) -> result<_, error-code>;
489 …c(old-path: string, new-descriptor: borrow<descriptor>, new-path: string) -> result<_, error-code>;
493 /// `error-code::not-permitted`.
497 symlink-at: func(old-path: string, new-path: string) -> result<_, error-code>;
500 /// Return `error-code::is-directory` if the path refers to a directory.
503 unlink-file-at: func(path: string) -> result<_, error-code>;
532 metadata-hash: func() -> result<metadata-hash-value, error-code>;
538 …ata-hash-at: func(path-flags: path-flags, path: string) -> result<metadata-hash-value, error-code>;
546 read-directory-entry: func() -> result<option<directory-entry>, error-code>;
549 /// Attempts to extract a filesystem-related `error-code` from the stream
560 filesystem-error-code: func(err: borrow<error>) -> option<error-code>;