diff options
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/unix/mod.rs | 8 |
2 files changed, 0 insertions, 15 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 922a213f9c2..751b8e48263 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -509,13 +509,6 @@ pub fn lstat(p: &Path) -> io::Result<FileAttr> { Ok(FileAttr { stat: stat }) } -pub fn utimes(p: &Path, atime: u64, mtime: u64) -> io::Result<()> { - let p = try!(cstr(p)); - let buf = [super::ms_to_timeval(atime), super::ms_to_timeval(mtime)]; - try!(cvt(unsafe { c::utimes(p.as_ptr(), buf.as_ptr()) })); - Ok(()) -} - pub fn canonicalize(p: &Path) -> io::Result<PathBuf> { let path = try!(CString::new(p.as_os_str().as_bytes())); let mut buf = vec![0u8; 16 * 1024]; diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 2efca0257f3..bbed42cc31d 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -82,7 +82,6 @@ pub fn cvt<T: One + PartialEq + Neg<Output=T>>(t: T) -> io::Result<T> { } } -#[allow(deprecated)] pub fn cvt_r<T, F>(mut f: F) -> io::Result<T> where T: One + PartialEq + Neg<Output=T>, F: FnMut() -> T { @@ -93,10 +92,3 @@ pub fn cvt_r<T, F>(mut f: F) -> io::Result<T> } } } - -pub fn ms_to_timeval(ms: u64) -> libc::timeval { - libc::timeval { - tv_sec: (ms / 1000) as libc::time_t, - tv_usec: ((ms % 1000) * 1000) as libc::suseconds_t, - } -} |
