pub struct FileUtils;Expand description
File utilities for cross-platform operations
Implementations§
Source§impl FileUtils
impl FileUtils
Sourcepub fn collect_test_files(
path: &Path,
exclude_patterns: &[String],
) -> Vec<PathBuf>
pub fn collect_test_files( path: &Path, exclude_patterns: &[String], ) -> Vec<PathBuf>
Collect all .gctf files from a directory, optionally excluding patterns.
Uses ignore crate which respects .gitignore and .ignore files.
Sourcepub fn sort_files(files: &mut [PathBuf], sort_by: &str)
pub fn sort_files(files: &mut [PathBuf], sort_by: &str)
Sort files by name or modification time
Sourcepub fn get_file_size(path: &Path) -> Result<u64>
pub fn get_file_size(path: &Path) -> Result<u64>
Get file size in bytes
Sourcepub fn resolve_relative_path(
base_file_path: &Path,
relative_path: &str,
) -> PathBuf
pub fn resolve_relative_path( base_file_path: &Path, relative_path: &str, ) -> PathBuf
Resolve a relative path against a base file’s directory
Auto Trait Implementations§
impl Freeze for FileUtils
impl RefUnwindSafe for FileUtils
impl Send for FileUtils
impl Sync for FileUtils
impl Unpin for FileUtils
impl UnsafeUnpin for FileUtils
impl UnwindSafe for FileUtils
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