pub struct FileIO { /* private fields */ }Implementations§
Source§impl FileIO
impl FileIO
Sourcepub fn from_url(path: &str) -> Result<FileIOBuilder>
pub fn from_url(path: &str) -> Result<FileIOBuilder>
Try to infer file io scheme from path.
The input HashMap is paimon-java’s Options
Sourcepub fn from_path(path: impl AsRef<str>) -> Result<FileIOBuilder>
pub fn from_path(path: impl AsRef<str>) -> Result<FileIOBuilder>
Try to infer file io scheme from path. See FileIO for supported schemes.
- If it’s a valid url, for example
s3://bucket/a, url scheme will be used, and the rest of the url will be ignored. - If it’s not a valid url, will try to detect if it’s a file path.
Otherwise will return parsing error.
Sourcepub fn new_output(&self, path: &str) -> Result<OutputFile>
pub fn new_output(&self, path: &str) -> Result<OutputFile>
Create a new output file to write data.
Sourcepub async fn get_status(&self, path: &str) -> Result<FileStatus>
pub async fn get_status(&self, path: &str) -> Result<FileStatus>
Return a file status object that represents the path.
Sourcepub async fn list_status(&self, path: &str) -> Result<Vec<FileStatus>>
pub async fn list_status(&self, path: &str) -> Result<Vec<FileStatus>>
List the statuses of the files/directories in the given path if the path is a directory.
FIXME: how to handle large dir? Better to return a stream instead?
Sourcepub async fn delete_file(&self, path: &str) -> Result<()>
pub async fn delete_file(&self, path: &str) -> Result<()>
Sourcepub async fn delete_dir(&self, path: &str) -> Result<()>
pub async fn delete_dir(&self, path: &str) -> Result<()>
Delete a dir recursively.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileIO
impl !RefUnwindSafe for FileIO
impl Send for FileIO
impl Sync for FileIO
impl Unpin for FileIO
impl UnsafeUnpin for FileIO
impl !UnwindSafe for FileIO
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