[−][src]Trait cap_dir_ext::DirExt
Extension trait for Dir
.
Required methods
fn set_atime<P: AsRef<Path>>(
&self,
path: P,
atime: SystemTimeSpec
) -> Result<()>
&self,
path: P,
atime: SystemTimeSpec
) -> Result<()>
Set the last access time for a file on a filesystem.
This corresponds to filetime::set_file_atime
.
fn set_mtime<P: AsRef<Path>>(
&self,
path: P,
mtime: SystemTimeSpec
) -> Result<()>
&self,
path: P,
mtime: SystemTimeSpec
) -> Result<()>
Set the last modification time for a file on a filesystem.
This corresponds to filetime::set_file_mtime
.
fn set_times<P: AsRef<Path>>(
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
Set the last access and modification times for a file on a filesystem.
This corresponds to filetime::set_file_times
.
fn set_symlink_times<P: AsRef<Path>>(
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
Set the last access and modification times for a file on a filesystem. This function does not follow symlink.
This corresponds to filetime::set_symlink_file_times
.
fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(&self, src: P, dst: Q) -> Result<()>
Creates a new symbolic link on a filesystem.
This corresponds to std::os::unix::fs::symlink
, except that
it's supported on non-Unix platforms as well, and it's not guaranteed
to be atomic.
fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
&self,
src: P,
dst: Q
) -> Result<()>
Creates a new file symbolic link on a filesystem.
This corresponds to std::os::windows::fs::symlink_file
, except that
it's supported on non-Windows platforms as well, and it's not guaranteed
to fail if the target is not a file.
fn symlink_dir<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
&self,
src: P,
dst: Q
) -> Result<()>
Creates a new directory symbolic link on a filesystem.
This corresponds to std::os::windows::fs::symlink_dir
, except that
it's supported on non-Windows platforms as well, and it's not guaranteed
to fail if the target is not a directory.
Implementations on Foreign Types
impl DirExt for Dir
[src]
fn set_atime<P: AsRef<Path>>(
&self,
path: P,
atime: SystemTimeSpec
) -> Result<()>
[src]
&self,
path: P,
atime: SystemTimeSpec
) -> Result<()>
fn set_mtime<P: AsRef<Path>>(
&self,
path: P,
mtime: SystemTimeSpec
) -> Result<()>
[src]
&self,
path: P,
mtime: SystemTimeSpec
) -> Result<()>
fn set_times<P: AsRef<Path>>(
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
[src]
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
fn set_symlink_times<P: AsRef<Path>>(
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
[src]
&self,
path: P,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<()>
fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(&self, src: P, dst: Q) -> Result<()>
[src]
fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
[src]
&self,
src: P,
dst: Q
) -> Result<()>
fn symlink_dir<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
[src]
&self,
src: P,
dst: Q
) -> Result<()>