pub struct NativeFs {
pub root: PathBuf,
}Expand description
A generalized file system-backed implementation of WriteTarget. It roots
all writes to the configured root, making it suitable for rendering
Noosphere content to a target directory.
Fields§
§root: PathBufTrait Implementations§
Source§impl WriteTarget for NativeFs
impl WriteTarget for NativeFs
Source§fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns true if a file exists at the provided path
Source§fn write<'life0, 'life1, 'async_trait, R>(
&'life0 self,
path: &'life1 Path,
contents: R,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
R: AsyncRead + Unpin + WriteTargetConditionalSend + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait, R>(
&'life0 self,
path: &'life1 Path,
contents: R,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
R: AsyncRead + Unpin + WriteTargetConditionalSend + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Path,
dst: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Path,
dst: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a symbolic link between the give source path and destination path
Auto Trait Implementations§
impl Freeze for NativeFs
impl RefUnwindSafe for NativeFs
impl Send for NativeFs
impl Sync for NativeFs
impl Unpin for NativeFs
impl UnwindSafe for NativeFs
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