From 753091f86f0c4a7bc0bcd1e1adf88086ad21b9b1 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 6 Aug 2022 21:21:55 -0400 Subject: [PATCH] Document the two FileInfo functions --- src/fiin.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fiin.rs b/src/fiin.rs index 9d67c2c..f4f4178 100644 --- a/src/fiin.rs +++ b/src/fiin.rs @@ -41,11 +41,17 @@ pub struct FIINEntry { } impl FileInfo { + /// Parses an existing FIIN file. pub fn from_existing(buffer : &MemoryBuffer) -> Option { let mut cursor = Cursor::new(buffer); Some(FileInfo::read(&mut cursor).ok()?) } + /// Creates a new FileInfo structure from a list of filenames. These filenames must be present in + /// the current working directory in order to be read properly, since it also generates SHA1 + /// hashes. + /// + /// The new FileInfo structure can then be serialized back into retail-compatible form. pub fn new(file_names : Vec<&str>) -> Option { let mut entries = vec![];