C# Class withSIX.Core.Tools.FileTools

Inheritance: IEnableLogging
Afficher le fichier Open project: SIXNetworks/withSIX.Desktop

Méthodes publiques

Свойство Type Description
IsRunningOnMono bool

Méthodes publiques

Méthode Description
CheckFile ( string path, bool checkExists = false, bool mayBeUnc = true ) : bool
ComparePathsEqualCase ( string source, string destination ) : bool
ComparePathsOsCaseSensitive ( IAbsolutePath path1, IAbsolutePath path2 ) : bool
ComparePathsOsCaseSensitive ( string path1, string path2 ) : bool
CreateBatFile ( IAbsoluteDirectoryPath path, string name, string content ) : Task
FilterPath ( FileSystemInfo info ) : string
FilterPath ( IPath info ) : string
FilterPath ( string pathName ) : string
FindParentWithName ( IAbsoluteDirectoryPath path, string key ) : IAbsoluteDirectoryPath
FindPathInParents ( string path, string key ) : string
GetDirectorySize ( IAbsoluteDirectoryPath p, string filter = null, string selector = "*.*", bool recurse = true ) : long
GetFileSize ( double size, Units unit = Units.B, string postFix = null ) : string
GetFileVersion ( string file ) : FileVersionInfo
GetFiles ( IAbsoluteDirectoryPath directory, string fileMask = "*.*", IEnumerable dirRootExclusions = null, IEnumerable fileRootExclusions = null ) : IEnumerable
GetVersion ( IAbsoluteFilePath exePath ) : System.Version
HandleDowncase ( string entry, IReadOnlyCollection excludes = null ) : void
HandleDowncaseFolder ( IAbsoluteDirectoryPath entry, IReadOnlyCollection excludes = null ) : void
IsDirectoryEmpty ( IAbsoluteDirectoryPath path ) : bool
IsPathRootedDirectlyIn ( IAbsoluteDirectoryPath path, IAbsoluteDirectoryPath root, bool mayBeEqual = false ) : bool
IsPathRootedIn ( IAbsoluteDirectoryPath path, IAbsoluteDirectoryPath root, bool mayBeEqual = false ) : bool
IsValidRootedPath ( string path, bool checkExists = false, bool mayBeUnc = false ) : bool
Lock ( string path, Func action ) : Task
MakeValidFileName ( string fileName, string ext ) : string
OpenCommandPrompt ( IAbsoluteDirectoryPath path ) : void
OpenFolderInExplorer ( IAbsoluteDirectoryPath path ) : void
OpenFolderInExplorer ( string path ) : void
OrderBySize ( IEnumerable ar, bool reverse = false ) : string[]
RemoveExtension ( string filePath, string toRemove = null ) : string
SelectInExplorer ( string path ) : void
SizePrediction ( string filePath ) : long

Private Methods

Méthode Description
CleanPath ( string path ) : string
GetFullCleanPath ( string path ) : string
GetIsRunningOnMono ( ) : bool
IsSameRoot ( IAbsoluteDirectoryPath sourcePath, IAbsoluteDirectoryPath destinationPath ) : bool
MakeValidBatFileName ( string fileName ) : string

Method Details

CheckFile() public méthode

public CheckFile ( string path, bool checkExists = false, bool mayBeUnc = true ) : bool
path string
checkExists bool
mayBeUnc bool
Résultat bool

ComparePathsEqualCase() public méthode

public ComparePathsEqualCase ( string source, string destination ) : bool
source string
destination string
Résultat bool

ComparePathsOsCaseSensitive() public méthode

public ComparePathsOsCaseSensitive ( IAbsolutePath path1, IAbsolutePath path2 ) : bool
path1 IAbsolutePath
path2 IAbsolutePath
Résultat bool

ComparePathsOsCaseSensitive() public méthode

public ComparePathsOsCaseSensitive ( string path1, string path2 ) : bool
path1 string
path2 string
Résultat bool

CreateBatFile() public méthode

public CreateBatFile ( IAbsoluteDirectoryPath path, string name, string content ) : Task
path IAbsoluteDirectoryPath
name string
content string
Résultat Task

FilterPath() public méthode

public FilterPath ( FileSystemInfo info ) : string
info System.IO.FileSystemInfo
Résultat string

FilterPath() public méthode

public FilterPath ( IPath info ) : string
info IPath
Résultat string

FilterPath() public méthode

public FilterPath ( string pathName ) : string
pathName string
Résultat string

FindParentWithName() public méthode

public FindParentWithName ( IAbsoluteDirectoryPath path, string key ) : IAbsoluteDirectoryPath
path IAbsoluteDirectoryPath
key string
Résultat IAbsoluteDirectoryPath

FindPathInParents() public méthode

public FindPathInParents ( string path, string key ) : string
path string
key string
Résultat string

GetDirectorySize() public méthode

public GetDirectorySize ( IAbsoluteDirectoryPath p, string filter = null, string selector = "*.*", bool recurse = true ) : long
p IAbsoluteDirectoryPath
filter string
selector string
recurse bool
Résultat long

GetFileSize() public méthode

public GetFileSize ( double size, Units unit = Units.B, string postFix = null ) : string
size double
unit Units
postFix string
Résultat string

GetFileVersion() public méthode

public GetFileVersion ( string file ) : FileVersionInfo
file string
Résultat System.Diagnostics.FileVersionInfo

GetFiles() public méthode

public GetFiles ( IAbsoluteDirectoryPath directory, string fileMask = "*.*", IEnumerable dirRootExclusions = null, IEnumerable fileRootExclusions = null ) : IEnumerable
directory IAbsoluteDirectoryPath
fileMask string
dirRootExclusions IEnumerable
fileRootExclusions IEnumerable
Résultat IEnumerable

GetVersion() public méthode

public GetVersion ( IAbsoluteFilePath exePath ) : System.Version
exePath IAbsoluteFilePath
Résultat System.Version

HandleDowncase() public méthode

public HandleDowncase ( string entry, IReadOnlyCollection excludes = null ) : void
entry string
excludes IReadOnlyCollection
Résultat void

HandleDowncaseFolder() public méthode

public HandleDowncaseFolder ( IAbsoluteDirectoryPath entry, IReadOnlyCollection excludes = null ) : void
entry IAbsoluteDirectoryPath
excludes IReadOnlyCollection
Résultat void

IsDirectoryEmpty() public méthode

public IsDirectoryEmpty ( IAbsoluteDirectoryPath path ) : bool
path IAbsoluteDirectoryPath
Résultat bool

IsPathRootedDirectlyIn() public méthode

public IsPathRootedDirectlyIn ( IAbsoluteDirectoryPath path, IAbsoluteDirectoryPath root, bool mayBeEqual = false ) : bool
path IAbsoluteDirectoryPath
root IAbsoluteDirectoryPath
mayBeEqual bool
Résultat bool

IsPathRootedIn() public méthode

public IsPathRootedIn ( IAbsoluteDirectoryPath path, IAbsoluteDirectoryPath root, bool mayBeEqual = false ) : bool
path IAbsoluteDirectoryPath
root IAbsoluteDirectoryPath
mayBeEqual bool
Résultat bool

IsValidRootedPath() public méthode

public IsValidRootedPath ( string path, bool checkExists = false, bool mayBeUnc = false ) : bool
path string
checkExists bool
mayBeUnc bool
Résultat bool

Lock() public méthode

public Lock ( string path, Func action ) : Task
path string
action Func
Résultat Task

MakeValidFileName() public méthode

public MakeValidFileName ( string fileName, string ext ) : string
fileName string
ext string
Résultat string

OpenCommandPrompt() public méthode

public OpenCommandPrompt ( IAbsoluteDirectoryPath path ) : void
path IAbsoluteDirectoryPath
Résultat void

OpenFolderInExplorer() public méthode

public OpenFolderInExplorer ( IAbsoluteDirectoryPath path ) : void
path IAbsoluteDirectoryPath
Résultat void

OpenFolderInExplorer() public méthode

public OpenFolderInExplorer ( string path ) : void
path string
Résultat void

OrderBySize() public méthode

public OrderBySize ( IEnumerable ar, bool reverse = false ) : string[]
ar IEnumerable
reverse bool
Résultat string[]

RemoveExtension() public méthode

public RemoveExtension ( string filePath, string toRemove = null ) : string
filePath string
toRemove string
Résultat string

SelectInExplorer() public méthode

public SelectInExplorer ( string path ) : void
path string
Résultat void

SizePrediction() public méthode

public SizePrediction ( string filePath ) : long
filePath string
Résultat long

Property Details

IsRunningOnMono public_oe static_oe property

public static bool IsRunningOnMono
Résultat bool