pub struct FileSystemStore { /* private fields */ }Expand description
Object-store backed file storage implementation
Implementations§
Source§impl FileSystemStore
impl FileSystemStore
Sourcepub async fn new(config: FileSystemConfig) -> Result<Self>
pub async fn new(config: FileSystemConfig) -> Result<Self>
Create a new FileSystemStore using the provided configuration
pub fn root_prefix(&self) -> Option<String>
pub fn scoped(&self, prefix: Option<&str>) -> Result<Self>
Sourcepub async fn read_raw(&self, path: &str) -> Result<String>
pub async fn read_raw(&self, path: &str) -> Result<String>
Read file content as raw string without line numbers
Sourcepub async fn read_with_line_numbers(
&self,
path: &str,
params: ReadParams,
) -> Result<FileReadResult>
pub async fn read_with_line_numbers( &self, path: &str, params: ReadParams, ) -> Result<FileReadResult>
Read file content with line numbers and optional line range
Sourcepub async fn read(
&self,
path: &str,
params: ReadParams,
) -> Result<FileReadResult>
pub async fn read( &self, path: &str, params: ReadParams, ) -> Result<FileReadResult>
Read file with optional line range (backward compatibility - uses read_with_line_numbers)
pub async fn write(&self, path: &str, content: &str) -> Result<()>
pub async fn write_binary(&self, path: &str, content: &[u8]) -> Result<()>
pub async fn read_binary(&self, path: &str) -> Result<Vec<u8>>
pub async fn list(&self, path: &str) -> Result<DirectoryListing>
pub async fn delete(&self, path: &str, recursive: bool) -> Result<()>
pub async fn copy(&self, source: &str, destination: &str) -> Result<()>
pub async fn move_file(&self, source: &str, destination: &str) -> Result<()>
pub async fn info(&self, path: &str) -> Result<FileMetadata>
pub async fn tree(&self, path: &str) -> Result<DirectoryListing>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileSystemStore
impl !RefUnwindSafe for FileSystemStore
impl Send for FileSystemStore
impl Sync for FileSystemStore
impl Unpin for FileSystemStore
impl UnsafeUnpin for FileSystemStore
impl !UnwindSafe for FileSystemStore
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> 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>
Converts
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>
Converts
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