class

Athena::MIME::Part::File

Inherits Reference < Object

An abstraction that allows representing a file without needing to keep the file open.

Constructors

new(path : String | Path, filename : String | Nil = nil)
Source

Class methods

mime_types
Source

Instance methods

content_type

Attempts to guess the content type of the file based on its path. Falls back to application/octet-stream.

Source
filename

Returns the name of the file, inferring it based on the basename of its path if not provided explicitly.

Source
path

Returns the path to the file on the filesystem.

Source
size

Returns the size of the file in bytes.

Source