pub struct PathUtils;
Expand description
File and path utilities
Implementations§
Source§impl PathUtils
impl PathUtils
Sourcepub fn ensure_dir_exists(path: &Path) -> Result<()>
pub fn ensure_dir_exists(path: &Path) -> Result<()>
Ensure directory exists, create if not
Sourcepub fn get_file_size(path: &Path) -> Result<u64>
pub fn get_file_size(path: &Path) -> Result<u64>
Get file size safely
Sourcepub fn is_readable_file(path: &Path) -> bool
pub fn is_readable_file(path: &Path) -> bool
Check if file exists and is readable
Sourcepub fn get_extension(path: &Path) -> Option<&str>
pub fn get_extension(path: &Path) -> Option<&str>
Get file extension safely
Auto Trait Implementations§
impl Freeze for PathUtils
impl RefUnwindSafe for PathUtils
impl Send for PathUtils
impl Sync for PathUtils
impl Unpin for PathUtils
impl UnwindSafe for PathUtils
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