[][src]Trait cap_fs_ext::DirExt

pub trait DirExt {
    pub fn set_atime<P: AsRef<Path>>(
        &self,
        path: P,
        atime: SystemTimeSpec
    ) -> Result<()>;
pub fn set_mtime<P: AsRef<Path>>(
        &self,
        path: P,
        mtime: SystemTimeSpec
    ) -> Result<()>;
pub fn set_times<P: AsRef<Path>>(
        &self,
        path: P,
        atime: Option<SystemTimeSpec>,
        mtime: Option<SystemTimeSpec>
    ) -> Result<()>;
pub fn set_symlink_times<P: AsRef<Path>>(
        &self,
        path: P,
        atime: Option<SystemTimeSpec>,
        mtime: Option<SystemTimeSpec>
    ) -> Result<()>;
pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(
        &self,
        src: P,
        dst: Q
    ) -> Result<()>;
pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(
        &self,
        src: P,
        dst: Q
    ) -> Result<()>;
pub fn symlink_dir<P: AsRef<Path>, Q: AsRef<Path>>(
        &self,
        src: P,
        dst: Q
    ) -> Result<()>; }

Extension trait for Dir.

Required methods

pub fn set_atime<P: AsRef<Path>>(
    &self,
    path: P,
    atime: SystemTimeSpec
) -> Result<()>
[src]

Set the last access time for a file on a filesystem.

This corresponds to filetime::set_file_atime.

pub fn set_mtime<P: AsRef<Path>>(
    &self,
    path: P,
    mtime: SystemTimeSpec
) -> Result<()>
[src]

Set the last modification time for a file on a filesystem.

This corresponds to filetime::set_file_mtime.

pub fn set_times<P: AsRef<Path>>(
    &self,
    path: P,
    atime: Option<SystemTimeSpec>,
    mtime: Option<SystemTimeSpec>
) -> Result<()>
[src]

Set the last access and modification times for a file on a filesystem.

This corresponds to filetime::set_file_times.

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.

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.

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.

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.

Loading content...

Implementations on Foreign Types

impl DirExt for Dir[src]

Loading content...

Implementors

Loading content...