File

File Attributes

AttributeTypeDescriptionExamplesStability
file.directorystringDirectory where the file is located. It should include the drive letter, when appropriate./home/user; C:\Program Files\MyAppExperimental
file.extensionstringFile extension, excluding the leading dot. [1]png; gzExperimental
file.namestringName of the file including the extension, without the directory.example.pngExperimental
file.pathstringFull path to the file, including the file name. It should include the drive letter, when appropriate./home/alice/example.png; C:\Program Files\MyApp\myapp.exeExperimental
file.sizeintFile size in bytes.Experimental

[1]: When the file name has multiple extensions (example.tar.gz), only the last one should be captured (“gz”, not “tar.gz”).