Click or drag to resize
Ab4d.SharpEngine logo

FileUtils Class

FileUtils static class contains method that help working with files.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesFileUtils

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static class FileUtils

The FileUtils type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberGlobalFileSearchPaths Gets a list of strings that can be used as global file search path. It is used by CommonFileNotFoundResolver(String) method.
Top
Methods
 NameDescription
Public methodStatic memberCommonFileNotFoundResolver CommonFileNotFoundResolver tries to resolve the filePath by first trying to fix directory separator and then when the filePath is not rooted, combining the filePath with the base application's path. The method also checks if the file exist in any of the GlobalFileSearchPaths. When the resolve succeeds (the file is found) then the value of filePath is updated and true is returned. When the method cannot help find the file, false is returned.
Public methodStatic memberFixDirectorySeparator FixDirectorySeparator method returns file path with correctly sets backslash or slash as directory separator based on the current OS.
Top
Fields
 NameDescription
Public fieldStatic memberResolveFileInApplicationBaseDirectory When true (by default) then the base application directory is automatically checked when resolving a file that does not exist.
Top
See Also