holoride
Search Results for

    Show / Hide Table of Contents

    Class FileUtils

    Inheritance
    object
    FileUtils
    Namespace: Holoride.ElasticSDK
    Assembly: Holoride.ElasticSDK.Library.Runtime.dll
    Syntax
    public static class FileUtils

    Methods

    CreateDirectoryIfMissing(string)

    Creates a directoy at the given path in the case it doesn't exist.

    Declaration
    public static DirectoryInfo CreateDirectoryIfMissing(string path)
    Parameters
    Type Name Description
    string path

    The path where to create the drectory.

    Returns
    Type Description
    DirectoryInfo

    The DirectoryInfo of the created directory or null if the directory already existed.

    ReadStringFromFile(string)

    Reads a string from a file.

    Declaration
    public static string ReadStringFromFile(string filePath)
    Parameters
    Type Name Description
    string filePath

    The string read from a file.

    Returns
    Type Description
    string

    The read string or null if the file could not be read.

    RemoveInvalidChars(string)

    Removes all invalid characters from a filename.

    Declaration
    public static string RemoveInvalidChars(string filename)
    Parameters
    Type Name Description
    string filename

    The name of the file.

    Returns
    Type Description
    string

    The cleaned name of the file.

    WriteStringToFile(string, string)

    Writes a string to a file.

    Declaration
    public static void WriteStringToFile(string s, string filePath)
    Parameters
    Type Name Description
    string s

    The string to write into the file.

    string filePath

    The path of the file.

    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint