Add getter methods for File object contents

This commit is contained in:
Matthias Beyer 2015-11-24 10:27:20 +01:00
parent da792694c5
commit c2135b5c6c
1 changed files with 8 additions and 0 deletions

View File

@ -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()