Skip to content

Commit 1cfec60

Browse files
committed
crate->std, imports
1 parent d058976 commit 1cfec60

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/fs.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
//! operations. Extra platform-specific functionality can be found in the
66
//! extension traits of `std::os::$platform`.
77
8-
#![stable(feature = "rust1", since = "1.0.0")]
9-
#![deny(unsafe_op_in_unsafe_fn)]
10-
118
#[cfg(all(test, not(any(target_os = "emscripten", target_env = "sgx"))))]
129
mod tests;
1310

14-
use crate::ffi::OsString;
15-
use crate::fmt;
16-
use crate::io::{self, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
17-
use crate::path::{Path, PathBuf};
18-
use crate::sys::fs as fs_imp;
11+
use std::ffi::OsString;
12+
use std::fmt;
13+
use std::io::{self, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
14+
use std::path::{Path, PathBuf};
15+
//use std::sys::fs as fs_imp;
16+
use crate::unix_fs as fs_imp;
17+
18+
//use std::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
1919
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
20-
use crate::time::SystemTime;
20+
21+
use std::time::SystemTime;
2122

2223
/// A reference to an open file on the filesystem.
2324
///
@@ -174,7 +175,7 @@ pub struct OpenOptions(fs_imp::OpenOptions);
174175
/// platforms. Unix-specific functionality, such as mode bits, is available
175176
/// through the [`PermissionsExt`] trait.
176177
///
177-
/// [`PermissionsExt`]: crate::os::unix::fs::PermissionsExt
178+
/// [`PermissionsExt`]: std::os::unix::fs::PermissionsExt
178179
#[derive(Clone, PartialEq, Eq, Debug)]
179180
#[stable(feature = "rust1", since = "1.0.0")]
180181
pub struct Permissions(fs_imp::FilePermissions);
@@ -1745,9 +1746,9 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Re
17451746
/// and [`std::os::windows::fs::symlink_file`] or [`symlink_dir`] should be
17461747
/// used instead to make the intent explicit.
17471748
///
1748-
/// [`std::os::unix::fs::symlink`]: crate::os::unix::fs::symlink
1749-
/// [`std::os::windows::fs::symlink_file`]: crate::os::windows::fs::symlink_file
1750-
/// [`symlink_dir`]: crate::os::windows::fs::symlink_dir
1749+
/// [`std::os::unix::fs::symlink`]: std::os::unix::fs::symlink
1750+
/// [`std::os::windows::fs::symlink_file`]: std::os::windows::fs::symlink_file
1751+
/// [`symlink_dir`]: std::os::windows::fs::symlink_dir
17511752
///
17521753
/// # Examples
17531754
///
@@ -2200,4 +2201,4 @@ impl AsInnerMut<fs_imp::DirBuilder> for DirBuilder {
22002201
fn as_inner_mut(&mut self) -> &mut fs_imp::DirBuilder {
22012202
&mut self.inner
22022203
}
2203-
}
2204+
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod fs;
12
mod unix_fs;
23
mod sys_common;
34
mod fd;

0 commit comments

Comments
 (0)