Crates.io | minilsof |
lib.rs | minilsof |
version | 0.1.2 |
source | src |
created_at | 2024-01-11 02:05:06.407131 |
updated_at | 2024-01-27 07:51:38.624698 |
description | minilsof |
homepage | |
repository | https://github.com/jokemanfire/minilsof |
max_upload_size | |
id | 1095783 |
size | 9,187 |
a easy lsof Implemented by Rust
use minilsof::LsofData;
//if return data is none unwarp will panic!
//lsof all
#[test]
fn test_lsall(){
let mut d = LsofData::new();
let result = d.file_ls().unwrap();
println!("{:?}",result);
}
//target file
#[test]
fn test_target(){
let filepath = "/usr/lib64/librt-2.28.so".to_string();
let mut d = LsofData::new();
let result = d.target_file_ls(filepath).unwrap();
println!("{:?}",result);
}