FileInfo

lumin. FileInfo

Class that encapsulates information about a file argument.

Constructor

new FileInfo()

Creates an empty FileInfo object.

Methods

getFileDescriptor() → {number}

Returns the file descriptor.

Returns:

the file descriptor.

Type
number

getFileName() → {string}

Returns the name of the file.

The file can be accessed only via the enclosed file descriptor
and not using this name. This is for information only.

Returns:

the file name.

Type
string

getMimeType() → {string}

Returns the mime type of the file.

Returns:

the file's mime type.

Type
string

setFileDescriptor(fd)

Sets the file descriptor.

Parameters:
Name Type Description
fd number

the file descriptor.

setFileName(filename)

Sets the name of the file.

The file can be accessed only via the enclosed file descriptor
and not using this name. This is for information only.

Parameters:
Name Type Description
filename string

the file name (for information only).

setMimeType(mimeType)

Sets the mime type of the file.

Parameters:
Name Type Description
mimeType string

the file's mime type.