FilePath

This represents a file. Technically, file paths aren't actually strings (for example, on Linux, they need not be valid utf-8, while a D string is supposed to be), even though we almost always use them like that.

This type is meant to represent a filename / path. I might not keep it around.

Members

Functions

contentTypeFromFileExtension
string contentTypeFromFileExtension()

Guesses the media (aka mime) content type from the file extension for this path.

directoryName
string directoryName()

Returns the path with the filename cut off.

extension
string extension()

Returns the file extension, if present, including the last dot.

filename
string filename()

Returns the path with the directory cut off.

Meta