Class DirectoryHelper
Provides methods for working with directories. Such as create if not exists and other helpful stuff.
Inheritance
System.Object
DirectoryHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.IO
Assembly: Simplic.CoreLib.dll
Syntax
public class DirectoryHelper
Methods
| Improve this Doc View SourceCreateDirectoryIfNotExists(String)
Creates a directory at the given path, if it's not existing
Declaration
public static bool CreateDirectoryIfNotExists(string Path)
Parameters
Type | Name | Description |
---|---|---|
System.String | Path | Path to the directory |
Returns
Type | Description |
---|---|
System.Boolean | True if the directory already exists |
GetFileNames(String, Boolean)
Get all filenames in a directory, without path information
Declaration
public static string[] GetFileNames(string path, bool fileNamesWithoutExtension = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the directory |
System.Boolean | fileNamesWithoutExtension | If set to true, the filenames will be returned without extensions |
Returns
Type | Description |
---|---|
System.String[] | List of filenames in the directory |