Skip to main content

Path

This class provides several static methods related to working with file paths. The class has several static methods for manipulating file paths:

  • GetFileName: Returns the file name and extension of the specified path
  • GetFileNameWithoutExtension: Returns the file name without the extension of the specified path
  • HasExtension: Determines whether the specified path includes a file extension
  • ChangeExtension: Changes the file extension of the specified path to the specified new extension
  • GetExtension: Returns the file extension of the specified path

These methods provide convenient wrappers around the corresponding methods in the System.IO.Path class, allowing you to easily perform operations such as getting the file name, checking for a file extension, changing the file extension, and retrieving the file extension from a given path.