MCPcopy Create free account

hub / github.com/VivekPanyam/lunchbox / functions

Functions98 in github.com/VivekPanyam/lunchbox

↓ 24 callersMethodwith_base_dir
Add the base dir when taking paths as input
src/chroot.rs:115
↓ 22 callersMethodto_std_path
(&self, path: impl AsRef<LunchboxPath>)
src/localfs.rs:133
↓ 21 callersMethodget
(&self)
src/chroot.rs:64
↓ 4 callersMethodcreate
Sets the option to create a new file, or open it if it already exists. In order for the file to be created, [`OpenOptions::write`] or [`OpenOptions::
src/types.rs:1197
↓ 4 callersMethodfile_type
Returns the file type for the file that this entry points at. This function will not traverse symlinks if this entry points at a symlink. # Example
src/types.rs:573
↓ 4 callersMethodfrom_std_path
(&self, path: impl AsRef<StdPath>)
src/localfs.rs:152
↓ 4 callersMethodopen
(&self, path: impl PathType)
src/localfs.rs:213
↓ 3 callersMethodmetadata
Equivalent to ``` async fn metadata(&self, fs: &impl ReadableFileSystem) -> std::io::Result<Metadata>; ``` An alias for [`fs.metadata(self)`](Readabl
src/path.rs:53
↓ 3 callersMethodpath
Returns the full path to the file that this entry represents. The full path may be created by joining the original path to `read_dir` with the filena
src/types.rs:549
↓ 3 callersMethodstrip_base_dir
Remove the base dir when returning paths
src/chroot.rs:93
↓ 2 callersMethodfile_name
Returns the bare file name of this directory entry without any other leading path component. # Examples ```no_run let mut entries = fs.read_dir(".")
src/types.rs:520
↓ 2 callersMethodis_dir
Tests whether this file type represents a directory. The result is mutually exclusive to the results of [`is_file`] and [`is_symlink`]; only zero or o
src/types.rs:710
↓ 2 callersMethodpermissions
Returns the permissions of the file this metadata is for. # Examples ```no_run let metadata = fs.metadata("foo.txt").await?; assert!(!metadata.perm
src/types.rs:959
↓ 2 callersMethodreadonly
Returns true if these permissions describe a readonly (unwritable) file. See the docs for individual filesystem implementations to see how they handl
src/types.rs:995
↓ 2 callersMethodtruncate
Sets the option for truncating a previous file. If a file is successfully opened with this option set it will truncate the file to 0 length if it alr
src/types.rs:1180
↓ 1 callersMethodaccessed
Returns the last access time of this metadata. Note that not all platforms will keep this field update in a file's metadata. # Errors This field mi
src/types.rs:814
↓ 1 callersMethodappend
Sets the option for the append mode. This option, when true, means that writes will append to a file instead of overwriting previous contents. Note t
src/types.rs:1161
↓ 1 callersMethodcreate_new
Sets the option to create a new file, failing if it already exists. No file is allowed to exist at the target location, also no (dangling) symlink. I
src/types.rs:1229
↓ 1 callersMethodcreated
Returns the creation time listed in this metadata. # Errors This field might not be available on all platforms, and will return an `Err` on platfor
src/types.rs:840
↓ 1 callersMethodinto_poller
(self)
src/types.rs:679
↓ 1 callersMethodis_file
Tests whether this file type represents a regular file. The result is mutually exclusive to the results of [`is_dir`] and [`is_symlink`]; only zero o
src/types.rs:725
↓ 1 callersMethodis_symlink
Tests whether this file type represents a symbolic link. The result is mutually exclusive to the results of [`is_dir`] and [`is_file`]; only zero or o
src/types.rs:743
↓ 1 callersMethodlen
Returns the size of the file, in bytes, this metadata is for. # Examples ```no_run let metadata = fs.metadata("foo.txt").await?; assert_eq!(0, meta
src/types.rs:946
↓ 1 callersMethodmetadata
Returns the metadata for the file that this entry points at. This function will not traverse symlinks if this entry points at a symlink. This functi
src/types.rs:598
↓ 1 callersMethodmodified
Returns the last modification time listed in this metadata. # Errors This field might not be available on all platforms, and will return an `Err` o
src/types.rs:866
↓ 1 callersMethodopen
Opens a file at `path` with the options specified by `self`. # Errors This function will return an error under a number of different circumstances.
src/types.rs:1276
↓ 1 callersMethodopen
(&self, path: impl PathType)
src/chroot.rs:152
↓ 1 callersMethodopen_with_opts
( &self, opts: &OpenOptions, path: impl PathType, )
src/chroot.rs:257
↓ 1 callersMethodpoll_next_entry
( &mut self, cx: &mut std::task::Context<'_>, fs: &'a ChrootFS<T>, )
src/chroot.rs:224
↓ 1 callersMethodread
(&self, path: impl PathType)
src/localfs.rs:232
↓ 1 callersMethodread_to_string
(&self, path: impl PathType)
src/chroot.rs:200
↓ 1 callersMethodread_to_string
(&self, path: impl PathType)
src/localfs.rs:266
↓ 1 callersMethodset_readonly
Modifies the readonly flag for this set of permissions. If the `readonly` argument is `true`, using the resulting `Permission` will update file permis
src/types.rs:1011
↓ 1 callersMethodsymlink_metadata
(&self, path: impl PathType)
src/chroot.rs:205
↓ 1 callersMethodsymlink_metadata
Equivalent to ``` async fn symlink_metadata(&self, fs: &impl ReadableFileSystem) -> std::io::Result<Metadata>; ``` An alias for [`fs.symlink_metadata
src/path.rs:72
↓ 1 callersMethodwrite
Sets the option for write access. This option, when true, will indicate that the file should be `write`-able if opened. If the file already exists,
src/types.rs:1117
↓ 1 callersMethodwrite
(&self, path: impl PathType, contents: impl AsRef<[u8]> + Send)
src/localfs.rs:408
Methodcanonicalize
(&self, path: impl PathType)
src/chroot.rs:160
Methodcanonicalize
Equivalent to ``` async fn canonicalize(&self, fs: &impl ReadableFileSystem) -> std::io::Result<PathBuf>; ``` An alias for [`fs.canonicalize(self)`](
src/path.rs:91
Methodcanonicalize
(&self, path: impl PathType)
src/localfs.rs:220
Methodcopy
(&self, from: impl PathType, to: impl PathType)
src/chroot.rs:271
Methodcopy
(&self, from: impl PathType, to: impl PathType)
src/localfs.rs:336
Methodcreate
Equivalent to ``` async fn create(&self, path: impl PathType) -> Result<Self::FileType> where Self::FileType: WritableFile; ``` Opens a file in write-
src/types.rs:212
Methodcreate_dir
(&self, path: impl PathType)
src/chroot.rs:278
Methodcreate_dir
(&self, path: impl PathType)
src/localfs.rs:344
Methodcreate_dir_all
(&self, path: impl PathType)
src/chroot.rs:284
Methodcreate_dir_all
(&self, path: impl PathType)
src/localfs.rs:351
Methodexists
(&self, fs: &(impl ReadableFileSystem + MaybeSync))
src/path.rs:167
Methodfrom
(value: std::fs::FileType)
src/types.rs:749
Methodhard_link
(&self, src: impl PathType, dst: impl PathType)
src/chroot.rs:290
Methodhard_link
(&self, src: impl PathType, dst: impl PathType)
src/localfs.rs:358
Methodis_dir
(&self, fs: &(impl ReadableFileSystem + MaybeSync))
src/path.rs:232
Methodis_file
(&self, fs: &(impl ReadableFileSystem + MaybeSync))
src/path.rs:198
Methodis_symlink
(&self, fs: &(impl ReadableFileSystem + MaybeSync))
src/path.rs:267
Functionmain
Replace inline code blocks in the README with links when generating docs
build.rs:23
Methodmetadata
(&self, path: impl PathType)
src/chroot.rs:167
Methodmetadata
(&self)
src/localfs.rs:177
Methodnew
(fs: &'a F, file_name: String, path: PathBuf)
src/types.rs:500
Methodnew
(inner: T, base_dir: PathBuf)
src/chroot.rs:88
Methodnew
Create a new LocalFS using the root of the filesystem (i.e. "/") as a base directory ``` use lunchbox::LocalFS; assert_eq!(LocalFS::new(), LocalFS::
src/localfs.rs:76
Methodnext_entry
Returns the next entry in the directory stream.
src/types.rs:675
Methodopen_with_opts
( &self, opts: &OpenOptions, path: impl PathType, )
src/localfs.rs:313
Methodpoll_next_entry
( &mut self, cx: &mut std::task::Context<'_>, fs: &'a LocalFS, )
src/localfs.rs:287
Methodread
Sets the option for read access. This option, when true, will indicate that the file should be `read`-able if opened. # Examples ```no_run use lunc
src/types.rs:1097
Methodread
(&self, path: impl PathType)
src/chroot.rs:172
Methodread_dir
( &self, path: impl PathType, )
src/chroot.rs:180
Methodread_dir
Equivalent to ``` async fn read_dir<T: ReadableFileSystem>( &self, fs: &T, ) -> std::io::Result<ReadDir<T::ReadDirPollerType, T>>; ``` An alias for [
src/path.rs:132
Methodread_dir
( &self, path: impl PathType, )
src/localfs.rs:240
Methodread_link
(&self, path: impl PathType)
src/chroot.rs:193
Methodread_link
Equivalent to ``` async fn read_link(&self, fs: &impl ReadableFileSystem) -> std::io::Result<PathBuf>; ``` An alias for [`fs.read_link(self)`](Readab
src/path.rs:110
Methodread_link
(&self, path: impl PathType)
src/localfs.rs:252
Methodremove_dir
(&self, path: impl PathType)
src/chroot.rs:297
Methodremove_dir
(&self, path: impl PathType)
src/localfs.rs:366
Methodremove_dir_all
(&self, path: impl PathType)
src/chroot.rs:303
Methodremove_dir_all
(&self, path: impl PathType)
src/localfs.rs:373
Methodremove_file
(&self, path: impl PathType)
src/chroot.rs:309
Methodremove_file
(&self, path: impl PathType)
src/localfs.rs:380
Methodrename
(&self, from: impl PathType, to: impl PathType)
src/chroot.rs:315
Methodrename
(&self, from: impl PathType, to: impl PathType)
src/localfs.rs:387
Methodset_len
(&self, size: u64)
src/localfs.rs:196
Methodset_permissions
(&self, path: impl PathType, perm: Permissions)
src/chroot.rs:322
Methodset_permissions
(&self, perm: Permissions)
src/localfs.rs:200
Methodsymlink
(&self, src: impl PathType, dst: impl PathType)
src/chroot.rs:328
Methodsymlink
(&self, src: impl PathType, dst: impl PathType)
src/localfs.rs:400
Methodsymlink_metadata
(&self, path: impl PathType)
src/localfs.rs:273
Methodsync_all
(&self)
src/localfs.rs:188
Methodsync_data
(&self)
src/localfs.rs:192
Functiontest_base_dir
()
src/localfs.rs:425
Functiontest_basic
()
src/localfs.rs:468
Functiontest_basic_chroot
()
src/chroot.rs:391
Functiontest_conversions
()
src/chroot.rs:367
Functiontest_conversions
()
src/localfs.rs:440
Functiontest_new
()
src/localfs.rs:434
Functiontest_path_join
Ensures that joining "absolute" paths to a prefix does not overwrite the prefix
src/chroot.rs:358
Methodtry_clone
(&self)
src/localfs.rs:181
Methodwith_base_dir
Create a new LocalFS given a base directory path. The returned filesystem will operate within the specified directory. Returns an error if the `base_d
src/localfs.rs:95
Methodwith_base_dir_unchecked
Create a new LocalFS given a base directory path. The returned filesystem will operate within the specified directory. This function DOES NOT check if
src/localfs.rs:125
Methodwrite
( &self, path: impl PathType, contents: impl AsRef<[u8]> + MaybeSend, )
src/chroot.rs:335