[][src]Trait dia_files::filter::Filter

pub trait Filter {
    fn accept(&self, path: &Path) -> bool;
}

Required methods

fn accept(&self, path: &Path) -> bool

Returns true to accept given path, false to ignore it

Notes

  • Filters of files should always return true if input path is a directory.

  • Filters of directories should always return true if input path is a file.

  • Because of above rules, !accept(...) is not always the opposite meaning that one might expect. For instance:

    • SymlinkFiles::accept(some_file) == false means some_file is not a symbolic link. However...
    • SymlinkFiles::accept(some_file) == true does not mean that some_file is a symbolic link. Obviously, some_file might be a directory.
Loading content...

Implementors

impl Filter for All[src]

impl Filter for AllPaths[src]

impl Filter for Any[src]

impl Filter for NonSymlinkFiles[src]

impl Filter for SymlinkFiles[src]

impl<'_> Filter for IgnoredDirNames<'_>[src]

impl<'_> Filter for IgnoredFileExts<'_>[src]

impl<'_> Filter for SomeDirNames<'_>[src]

impl<'_> Filter for SomeFileExts<'_>[src]

impl<'_> Filter for SomeFileNames<'_>[src]

Loading content...