Skip to main content

Module fs_util

Module fs_util 

Source
Expand description

File system helpers.

Structsยง

FileId ๐Ÿ”’
The identity of a file, which tells whether a path still refers to it. Its inode number cannot be reused while the file is open, like a socket the server still listens on.
TempFile ๐Ÿ”’
A file path which gets removed on drop.

Enumsยง

RemoveError ๐Ÿ”’
Why FileId::remove_at failed.

Functionsยง

check_absolute ๐Ÿ”’
Fail for a path of a request which is not absolute, an empty one included. The server would resolve it in its working directory otherwise.
check_file_path ๐Ÿ”’
Fail for a path of a request which cannot be a file the server writes: one which is not absolute, see check_absolute, or one which does not name a file, like / or one which ends in .., / or /.. Writing it would fail anyway, but only once the container exited, when nobody gets told anymore. Path::file_name alone would take the last two for the file before them.
remove_file ๐Ÿ”’
Remove a file, one which does not exist is no error.