Struct upspin::UpspinPath
[−]
[src]
pub struct UpspinPath { /* fields omitted */ }
The path to a file in upspin
Methods
impl UpspinPath
[src]
pub fn owner(&self) -> &String
[src]
Returns the owner portion of the UpspinPath
.
For "augie@upspin.io/Images/Augie/small.jpg" this would be "augie".
pub fn path(&self) -> &String
[src]
Returns the path portion of the UpspinPath
.
For "augie@upspin.io/Images/Augie/small.jpg" this would be "Images/Augie/small.jpg".
pub fn file_name(&self) -> &str
[src]
Returns the file name of the UpspinPath
.
For "augie@upspin.io/Images/Augie/small.jpg" this would be "small.jpg".
pub fn full_path(&self) -> String
[src]
Returns the full upspin path of the UpspinPath
.
For "augie@upspin.io/Images/Augie/small.jpg" this would be "augie@upspin.io/Images/Augie/small.jpg".
pub fn is_public(&self) -> bool
[src]
Checks if the file is publicly available.
pub fn get(&self, output_path: &Path) -> Result<(), Error>
[src]
Downloads the file from upspin to the provided output path.
Only downloads publicly available files.