Skip to main content

oldest_file_in_folder

Function oldest_file_in_folder 

Source
pub fn oldest_file_in_folder(current_path: &Path) -> Result<Option<PathBuf>>
Expand description

Returns the oldest file in a directory based on modification time.

§Arguments

  • current_path - The directory to search

§Returns

Returns Some(PathBuf) pointing to the oldest file, or None if the directory is empty.