Add detect support for pfs

This commit is contained in:
2025-07-28 22:59:50 +08:00
parent 084925e81f
commit e64f6fcd07
2 changed files with 21 additions and 1 deletions

View File

@@ -400,3 +400,8 @@ impl Script for AstScript {
Ok(())
}
}
pub fn is_this_format(_filename: &str, buf: &[u8], buf_len: usize) -> bool {
let parser = parser::Parser::new(&buf[..buf_len], Encoding::Utf8);
parser.try_parse_header().is_ok()
}