pub fn copy_file_from_as(&self, path: impl AsRef<Path>, new_name: &str) -> Option<()> {
        let path = path.as_ref();
        if !path.is_file() {
            return None;
        }
        fs::copy(path, self.full_path(new_name)).ok().map(|_| ())
    }
/// Copy a file from the path outside environment into the environment current dir
/// Assigns the file a new_name in the current environment
/// Returns None if copying was not successful
Copy a file from the path outside environment into the environment current dir
Assigns the file a new_name in the current environment
Returns None if copying was not successful
Copy a file from the path outside environment into the environment current dir Assigns the file a new_name in the current environment Returns None if copying was not successful
pub fn copy_file_from_as(&self, path: impl AsRef<Path>, new_name: &str) -> Option<()> {
        let path = path.as_ref();
        if !path.is_file() {
            return None;
        }
        fs::copy(path, self.full_path(new_name)).ok().map(|_| ())
    }
pub fn copy_file_from_as ( & self , path : impl AsRef < Path > , new_name : & str ) -> Option < ( ) > { let path = path . as_ref ( ) ; if ! path . is_file ( ) { return None ; } fs :: copy ( path , self . full_path ( new_name ) ) . ok ( ) . map ( | _ | ( ) ) }
Copy a file from the path outside environment into the environment current dir
Assigns the file a new_name in the current environment
Returns None if copying was not successful
Copy a file from the path outside environment into the environment current dir Assigns the file a new_name in the current environment Returns None if copying was not successful
&self
path
impl AsRef<Path>
new_name
&str