Crate file_operation

Source

Structs§

FileDataString

Functions§

append_to_file
Append the provided content to a file at the specified file_path. If the file does not exist, it will be created. If the file exists, the content will be appended to it.
async_append_to_file
Append the provided content to a file at the specified file_path asynchronously.
async_copy_dir_files
Asynchronously copies all files from the source directory to the destination directory.
async_copy_file
Asynchronously copies a file from the source path to the destination path.
async_delete_dir
Asynchronously deletes a directory and all its contents.
async_delete_file
Asynchronously deletes a file at the given path.
async_get_file_size
Retrieves the size of a file at the specified file_path in bytes.
async_move_dir
Moves a directory and all its contents to another location asynchronously.
async_move_file
Moves a file from the source path to the destination path asynchronously.
async_read_from_file
Reads the content of a file at the specified file_path and converts it to the type T. The conversion is done by using the From<Vec<u8>> trait, which allows the file content (read as raw bytes) to be converted into a type T.
async_write_to_file
Writes the provided content to a file at the specified file_path asynchronously.
copy_dir_files
Copies all files from the source directory to the destination directory.
copy_file
Copies a file from the source path to the destination path.
delete_dir
Deletes a directory and all its contents.
delete_file
Deletes a file at the given path.
get_file_size
Retrieves the size of a file at the specified file_path in bytes.
move_dir
Moves a directory and all its contents to another location.
move_file
Moves a file from the source path to the destination path.
read_from_file
Reads the content of a file at the specified file_path and converts it to the type T. The conversion is done by using the From<Vec<u8>> trait, which allows the file content (read as raw bytes) to be converted into a type T.
write_to_file
Writes the provided content to a file at the specified file_path. If the file does not exist, it will be created. If the file exists, the content will be appended to it.