autopath 0.1.0

rust path get
Documentation
  • Coverage
  • 28.57%
    2 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 5.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.15 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 450220020

autopath

autopath autoload 的附属包

#[test]
fn test_path(){
    let a_p = "C:/Users/Joinz/.cargo/registry/src/github.com-1ecxxxxx9ec823/autocall-0.1.6/src/lib.rs".to_string();
    let b_p = "rscontr/src/lib.rs".to_string();
    let c_p = "src/lib.rs".to_string();
    let a= get_caller_file_path(a_p.clone());
    let b= get_caller_file_path(b_p.clone());
    let c= get_caller_file_path(c_p.clone());
    println!(" a:{} \n b:{} \n c:{}",a,b,c);


    let a= get_caller_path(a_p.clone());
    let b= get_caller_path(b_p.clone());
    let c= get_caller_path(c_p.clone());
    println!(" a:{} \n b:{} \n c:{}",a,b,c);

    let e = get_lib_crate_path();
    let f = get_work_path();

    println!("e:{} ,f:{}",e,f);
}

More patterns and use-cases are in the docs!

Related crates