pub struct FileUtil;
Expand description
*struct: FileUtil *desc: 文件操作工具类 *author: Listening *email: yuenxillar@163.com *date: 2024/10/02
Implementations§
Source§impl FileUtil
impl FileUtil
pub fn read_file(path: &str) -> Result<Vec<u8>, Box<dyn Error>>
pub fn is_file_exist(path: &str) -> bool
pub fn read_file_to_string(path: &str) -> Result<String, Box<dyn Error>>
pub fn read_file_into_application<T: DeserializeOwned + Debug>( file_path: &str, ) -> (T, HashMap<String, Value>)
Auto Trait Implementations§
impl Freeze for FileUtil
impl RefUnwindSafe for FileUtil
impl Send for FileUtil
impl Sync for FileUtil
impl Unpin for FileUtil
impl UnwindSafe for FileUtil
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more