Object - file : FileInfo

FileInfo record contains metadata information of a file. This record is returned by getFileInfo function is os module.

Constructor

__init

(string name, int size, Time modifiedTime, boolean dir, string path)

  • name string
  • size int
  • dir boolean
  • path string

Methods

getName

()

returns string

Returns the file name.

  • Return Type

    (string)
  • the file name

getSize

()

returns int

Returns the file size.

  • Return Type

    (int)
  • the file size

getLastModifiedTime

()

returns Time

Returns last modified time of the file.

  • Return Type

    (Time)
  • Last modified time of the file.

isDir

()

returns boolean

Returns whether the file is a directory.

  • Return Type

    (boolean)
  • File is a directory or not.

getPath

()

returns string

Returns the file path.

  • Return Type

    (string)
  • the file path