Function rood::sys::file::make_executable [−][src]
pub fn make_executable<T>(p: T) -> Result<()> 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();