pub struct Dir {
pub path: PathBuf,
/* private fields */
}
Expand description
Represents a dir in the filesystem. Accepts a path and contains a vector of files added.
To a Dir, you can attach files but not other dirs. To attach subdirectories, add them
directly to Project and specify the parent dir in the path.
Adds a file to the Dir. Accepts any type that can be converted to a PathBuf just like the
rest of the crate. Contents of the file should be specified as well (in bytes).
Converts this type into a mutable reference of the (usually inferred) input type.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.