C# Class Rosalia.FileSystem.FileSystemExtensions

A set of helpful extension methods for file system objects
Afficher le fichier Open project: rosaliafx/Rosalia

Méthodes publiques

Méthode Description
Closest ( this directory, Predicate predicate ) : IDirectory

Finds closest directory matching the predicate. Checks the directory itself and it's parents. Returns null if none of parent directories match the predicate.

GetParentsChain ( this directory ) : IEnumerable

Yields directory itself and all it's parents.

ReadAllText ( this file ) : string
SearchFilesRecursively ( this directory ) : FileList

Retrieves all directory files recursively.

WriteStringToFile ( this file, string content ) : void

Writes a string to a file.

Private Methods

Méthode Description
GetFilesRecursivelySource ( this directory ) : IEnumerable
SearchFilesIn ( this directory ) : FileList

Method Details

Closest() public static méthode

Finds closest directory matching the predicate. Checks the directory itself and it's parents. Returns null if none of parent directories match the predicate.
public static Closest ( this directory, Predicate predicate ) : IDirectory
directory this
predicate Predicate
Résultat IDirectory

GetParentsChain() public static méthode

Yields directory itself and all it's parents.
public static GetParentsChain ( this directory ) : IEnumerable
directory this
Résultat IEnumerable

ReadAllText() public static méthode

public static ReadAllText ( this file ) : string
file this
Résultat string

SearchFilesRecursively() public static méthode

Retrieves all directory files recursively.
public static SearchFilesRecursively ( this directory ) : FileList
directory this target directory
Résultat System.IO.FileList

WriteStringToFile() public static méthode

Writes a string to a file.
public static WriteStringToFile ( this file, string content ) : void
file this destination file
content string string content
Résultat void