Class AbstractPath

AbstractPath class

An AbstractPath is a base class for classes that specify a unique location in an environment similar to a filesystem, like a local filesystem, a remote file storage or a ZIP archive, among others.

public abstract class AbstractPath

Properties

NameDescription
abstract Location { get; }Gets a string representation of the location of this AbstractPath.
abstract Separator { get; }Gets a separator character used to separate directory levels of the Location string.

Methods

NameDescription
static FromLocalPath(string)Creates an AbstractPath that represents a location on the local filesystem.
static FromStream(Stream)Creates an AbstractPath from a Stream.
virtual Combine(string)Combines this AbstractPath with specified path components.
abstract Delete()Deletes a file pointed to by this path.
GetExtension()Returns the extension of this AbstractPath.
GetFileName()Returns the file name and extension of this AbstractPath.
GetFileNameWithoutExtension()Returns the file name of this AbstractPath without the extension.
abstract IsFile()Gets a value indicating whether this path points to an existing file that can be opened for reading.
abstract ListDirectory()Returns paths located inside this AbstractPath, if it’s a directory.
abstract Open(FileAccess)Opens this AbstractPath as a file.
virtual WithExtension(string)Returns a new AbstractPath with the file extension changed to the specified value.

Remarks

An AbstractPath might specify a location on a local filesystem, a location on a remote filesystem or an external storage like the Azure Blob storage, and so on. The location might point to an existing or not existing file-like objects, directory-like objects, or have any other meaning reasonable for the environment it belongs to. As an example, an AbstractPath inheritor that represents a location on the local filesystem can point to an existing file, directory, or to a place in the filesystem that has not been created yet. In order to make a new filesystem-like storage available to Aspose.GIS, one should inherit this class and implement its abstract methods.

See Also