Module file

Module file 

Source

Functionsยง

create_temp_dir
Create a temporary directory with a given prefix
get_file_extension
Get file extension as lowercase string
get_file_size
Get file size in bytes
guess_mime_from_path
Guess MIME type from file extension
is_audio_file
Check if a file is an audio file based on its extension
is_file_size_acceptable
Check if file size is within acceptable limits
is_image_file
Check if a file is an image based on its extension
is_text_file
Check if a file is a text file based on its extension
is_video_file
Check if a file is a video file based on its extension
read_file
Read bytes from a file path
remove_file
Remove a file from the filesystem
save_temp_file
Minimal file management helpers for multimodal flows.
validate_file
Validate that a file exists and is readable