pub type FileInfo = NamedFileProtocolInfo<FileInfoHeader>;
Expand description
Generic file information
The following rules apply when using this struct with set_info()
:
- On directories, the file size is determined by the contents of the
directory and cannot be changed by setting
file_size
. This member is ignored byset_info()
. - The
physical_size
is determined by thefile_size
and cannot be changed. This member is ignored byset_info()
. - The
FileAttribute::DIRECTORY
bit cannot be changed. It must match the file’s actual type. - A value of zero in create_time, last_access, or modification_time causes the fields to be ignored (and not updated).
- It is forbidden to change the name of a file to the name of another existing file in the same directory.
- If a file is read-only, the only allowed change is to remove the read-only attribute. Other changes must be carried out in a separate transaction.
Implementations
Create a FileInfo
structure
The structure will be created in-place within the provided storage
buffer. The buffer must be large enough to hold the data structure,
including a null-terminated UCS-2 version of the name
string.
The buffer must be correctly aligned. You can query the required
alignment using the alignment()
method of the Align
trait that this
struct implements.
Physical space consumed by the file on the file system volume
Time when the file was created
Time when the file was last accessed
Time when the file’s contents were last modified
Attribute bits for the file