pub struct Paths {
pub vault: PathBuf,
pub index_dir: PathBuf,
}Expand description
Resolved filesystem locations for one vault.
Fields§
§vault: PathBuf§index_dir: PathBufImplementations§
Source§impl Paths
impl Paths
Sourcepub fn resolve(vault: Option<&Path>) -> Self
pub fn resolve(vault: Option<&Path>) -> Self
Resolve paths for a vault root.
The derived index always lives under application support, never
inside the vault. This honors §15’s hard rule: a vault placed inside an
iCloud Drive folder would otherwise sync the binary index files and
corrupt them across devices. For the default vault the index sits at the
documented …/index/ location (§5.1); a custom (--vault) vault is
namespaced under …/index/by-vault/<hash>/ so distinct vaults never
share an index.
pub fn memos_root(&self) -> PathBuf
pub fn trash_root(&self) -> PathBuf
pub fn assets_root(&self) -> PathBuf
Sourcepub fn asset_path(&self, name: &str) -> PathBuf
pub fn asset_path(&self, name: &str) -> PathBuf
Path of a single asset by its <hash>.<ext> name. Caller is
responsible for validating name (see assets::valid_name); this
only joins it.
pub fn config_path(&self) -> PathBuf
pub fn meta_db_path(&self) -> PathBuf
pub fn meta_lock_path(&self) -> PathBuf
Sourcepub fn index_fmt_marker_path(&self) -> PathBuf
pub fn index_fmt_marker_path(&self) -> PathBuf
Marker file recording the indexed preview format version. Its absence
(or a stale version) triggers a one-time reindex on startup so cached
previews are regenerated after make_preview changes.
pub fn search_dir(&self) -> PathBuf
Sourcepub fn memo_path(&self, id: MemoId, created_at: OffsetDateTime) -> PathBuf
pub fn memo_path(&self, id: MemoId, created_at: OffsetDateTime) -> PathBuf
Where a live note’s file lives, sharded by creation year/month.
pub fn trash_path(&self, id: MemoId) -> PathBuf
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paths
impl RefUnwindSafe for Paths
impl Send for Paths
impl Sync for Paths
impl Unpin for Paths
impl UnsafeUnpin for Paths
impl UnwindSafe for Paths
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more