Skip to main content

FileSystem

Struct FileSystem 

Source
pub struct FileSystem { /* private fields */ }

Implementations§

Source§

impl FileSystem

Source

pub fn from_root<P: AsRef<Path>>(root: P) -> Self

Source

pub fn record_prefixes<T: MutTxnTExt + TxnTExt + Send + Sync + 'static, C: ChangeStore + Clone + Send + 'static, P: AsRef<Path>>( &self, txn: ArcTxn<T>, algo: Algorithm, channel: ChannelRef<T>, changes: &C, state: &mut RecordBuilder, repo_path: CanonicalPathBuf, prefixes: &[P], force: bool, threads: usize, salt: u64, ) -> Result<(), Error<C::Error, T>>
where T::Channel: Send + Sync,

Source

pub fn add_prefix_rec<T: MutTxnTExt + TxnTExt>( &self, txn: &ArcTxn<T>, repo_path: CanonicalPathBuf, full: CanonicalPathBuf, force: bool, threads: usize, salt: u64, ) -> Result<(), AddError<T>>

Source

pub fn iterate_prefix_rec<F: Fn(&Path, bool) -> bool + Send + Sync + 'static>( &self, repo_path: CanonicalPathBuf, full: CanonicalPathBuf, force: bool, threads: usize, follow: F, ) -> Result<Untracked, Error>

Source

pub fn record_prefix<T: MutTxnTExt + TxnTExt + Send + Sync + 'static, C: ChangeStore + Clone + Send + 'static>( &self, txn: ArcTxn<T>, algorithm: Algorithm, channel: ChannelRef<T>, changes: &C, state: &mut RecordBuilder, repo_path: CanonicalPathBuf, prefix: &Path, force: bool, threads: usize, salt: u64, ) -> Result<(), Error<C::Error, T>>
where T::Channel: Send + Sync,

Trait Implementations§

Source§

impl Clone for FileSystem

Source§

fn clone(&self) -> FileSystem

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl WorkingCopy for FileSystem

Source§

type Writer = BufWriter<File>

Source§

fn create_dir_all(&self, file: &str) -> Result<(), Self::Error>

Source§

fn remove_path(&self, path: &str, rec: bool) -> Result<(), Self::Error>

Source§

fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error>

Source§

fn set_permissions( &self, name: &str, permissions: u16, ) -> Result<(), Self::Error>

Source§

fn write_file(&self, file: &str, _: Inode) -> Result<Self::Writer, Self::Error>

Source§

fn touch(&self, file: &str, time: SystemTime) -> Result<(), Self::Error>

Source§

fn is_writable(&self, _path: &str) -> Result<bool, Self::Error>

Source§

impl WorkingCopyRead for FileSystem

Source§

type Error = Error

Source§

fn file_metadata(&self, file: &str) -> Result<InodeMetadata, Self::Error>

Source§

fn read_file(&self, file: &str, buffer: &mut Vec<u8>) -> Result<(), Self::Error>

Source§

fn modified_time(&self, file: &str) -> Result<SystemTime, Self::Error>

Source§

fn decode_file( &self, file: &str, buffer: &mut Vec<u8>, ) -> Result<Option<Encoding>, Self::Error>

Read the file into the buffer Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.