Add getter methods for File object contents
This commit is contained in:
parent
da792694c5
commit
c2135b5c6c
1 changed files with 8 additions and 0 deletions
|
@ -209,6 +209,14 @@ impl File {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn contents(&self) -> (FileHeaderData, String) {
|
||||
(self.header, self.data)
|
||||
}
|
||||
|
||||
pub fn id(&self) -> FileID {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn get_new_file_id() -> FileID {
|
||||
use uuid::Uuid;
|
||||
Uuid::new_v4().to_hyphenated_string()
|
||||
|
|
Loading…
Reference in a new issue