somefiletools 0.0.2

some useful functions about file operation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate filetools;
use std::{env};
fn main() {
    //当前目录
    let current_dir =env::current_dir().unwrap();
    let current_dir_path  =current_dir.to_str().unwrap();
    //文本文件判断
    let test_file1_path =format!("{}/examples/test_file1.txt",&current_dir_path);
    println!("test_file1:{}",filetools::is_binary_file(&test_file1_path).unwrap());


    //二进制文件判断
    let test_file2_path =format!("{}/examples/test_file2.jpg",&current_dir_path);
    println!("test_file2:{}",filetools::is_binary_file(&test_file2_path).unwrap());
}