Skip to content

Commit 4a0bc71

Browse files
committed
Add File set_permissions
1 parent b3c91df commit 4a0bc71

File tree

1 file changed

+4
-0
lines changed
  • src/libstd/sys/redox

1 file changed

+4
-0
lines changed

src/libstd/sys/redox/fs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ impl File {
316316
Ok(File(FileDesc::new(fd)))
317317
}
318318

319+
pub fn set_permissions(&self, perm: FilePermissions) -> io::Result<()> {
320+
set_perm(&self.path()?, perm)
321+
}
322+
319323
pub fn path(&self) -> io::Result<PathBuf> {
320324
let mut buf: [u8; 4096] = [0; 4096];
321325
match libc::fpath(*self.fd().as_inner() as usize, &mut buf) {

0 commit comments

Comments
 (0)