mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-14 01:53:16 +00:00
resetprop: replace nanopb with quick-protobuf for persist
This commit is contained in:
@@ -345,6 +345,27 @@ impl Directory {
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn for_all_file<F: FnMut(&DirEntry) -> io::Result<WalkResult>>(
|
||||
&mut self,
|
||||
mut f: F,
|
||||
) -> io::Result<WalkResult> {
|
||||
use WalkResult::*;
|
||||
loop {
|
||||
match self.read()? {
|
||||
None => return Ok(Continue),
|
||||
Some(ref e) => {
|
||||
if e.is_dir() {
|
||||
return Ok(Continue);
|
||||
}
|
||||
match f(e)? {
|
||||
Abort | Skip => return Ok(Continue),
|
||||
Continue => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Directory {
|
||||
|
||||
Reference in New Issue
Block a user