pub struct DirFiles(/* private fields */);Expand description
Files kept as plain files under a directory, each name its path
there, such as data kept outside any session. Folders are made as files
are written, and nothing is written before.
Implementations§
Trait Implementations§
impl Eq for DirFiles
Source§impl Files for DirFiles
impl Files for DirFiles
Source§fn write_file(&self, name: &str, bytes: &[u8]) -> Result<()>
fn write_file(&self, name: &str, bytes: &[u8]) -> Result<()>
Replaces the file
name with bytes, atomically: a reader sees the
old content or the new.Source§fn append_file(&self, name: &str, bytes: &[u8]) -> Result<()>
fn append_file(&self, name: &str, bytes: &[u8]) -> Result<()>
Adds
bytes at the end of the file name, which it creates when
there is none.Source§fn read_file(&self, name: &str) -> Result<Vec<u8>>
fn read_file(&self, name: &str) -> Result<Vec<u8>>
The file
name; io::ErrorKind::NotFound when there is none.impl StructuralPartialEq for DirFiles
Auto Trait Implementations§
impl Freeze for DirFiles
impl RefUnwindSafe for DirFiles
impl Send for DirFiles
impl Sync for DirFiles
impl Unpin for DirFiles
impl UnsafeUnpin for DirFiles
impl UnwindSafe for DirFiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.