File System File System
File System File System
DocFX + Singulink = ♥

Search Results for

    Method RemoveExtension

    RemoveExtension(string, PathOptions)

    Removes the specified single extension, which is the last extension of the file name. Case is ignored on every platform.

    Declaration
    IRelativeFilePath RemoveExtension(string extension, PathOptions options = PathOptions.NoUnfriendlyNames)
    Parameters
    Type Name Description
    string extension

    The single extension to remove, shaped as described for HasExtension(string). An empty extension leaves the path unchanged.

    PathOptions options

    The options to apply when parsing the new file name. The rest of the path is not reparsed.

    Returns
    Type Description
    IRelativeFilePath
    Exceptions
    Type Condition
    ArgumentException

    The extension isn't shaped as described for HasExtension(string) or has a character that names can't have in the path format, the file name doesn't end with it, it is the whole file name, or the remaining file name is invalid for options or is . or ...

    © Singulink. All rights reserved.