Struct nya::SimpleFile [−][src]
pub struct SimpleFile { pub name: OsString, pub content: String, pub abs_path: PathBuf, pub rel_path: PathBuf, }
A struct describing a simple file, with only a name, content, and its path.
Examples
let file = nya::SimpleFile { name: std::ffi::OsString::from("coolfile.txt"), content: "hello".to_string(), abs_path: std::path::PathBuf::from(r"/home/coolfile.txt"), rel_path: std::path::PathBuf::from(r"coolfile.txt"), };
Fields
name: OsString
The filename, as an OsString
.
content: String
The content of the file, as an owned String
.
abs_path: PathBuf
The absolute path of the file, as a PathBuf
.
rel_path: PathBuf
The relative path of the file, as a PathBuf
.
Trait Implementations
impl Debug for SimpleFile
[src]
impl Debug for SimpleFile
Auto Trait Implementations
impl Send for SimpleFile
impl Send for SimpleFile
impl Sync for SimpleFile
impl Sync for SimpleFile