[][src]Function rood::sys::file::make_executable

pub fn make_executable<T>(p: T) -> Result<(), Error> where
    T: AsRef<Path>, 

Mark the specified file as executable.

On unix systems, the implementation will be equivalent to chmod +x {p}.

Note: Does nothing for now on Windows.

Examples

use rood::sys::file;
use std::fs;

let file_name = "myfile.sh";
let file_handle = fs::File::create(file_name).unwrap();
file::make_executable(file_name).unwrap();