FileInfo
Method Signature
FileInfo(file=[any])Arguments
Argument
Type
Required
Description
Default
Examples
Output some information about a temporary file
myFile = getTempFile( getTempDirectory(), "testFile" );
fileInfo = getFileInfo( myFile );
isReadable = (!fileInfo.CANREAD ? "un" : "") & "readable";
isWritable = (!fileInfo.CANWRITE ? "un" : "") & "writable";
isHidden = (!fileInfo.ISHIDDEN ? "not " : "") & "hidden";
date = DateTimeFormat( fileInfo.LASTMODIFIED, "full" );
fileSize = NumberFormat( fileInfo.SIZE / 1000 / 1000, "0.00" );
writeOutput( """" & fileInfo.NAME & """ is " & isReadable & ", " & isWritable & " and " & isHidden & ". " );
writeOutput( "It was at last modified at " & date & " and has a size of " & fileSize & " MB" );
Additional Examples
Related
Last updated
Was this helpful?
