Description

Returns the requested attributes of a file. Attributes include size, create date, create time and extended attributes like image details and mp3 encoding details.

Syntax

attribs = RTI_OS_Directory( "GetAttributes", directory, filename <, attributes> )

Parameters

directoryThe directory path containing the file whose attributes are to be returned.
filenameThe name of the file whose attributes are to be returned.
attributes<Optional> An @fm or @vm-delimited list of attributes to be returned. If null, then the function will return all attributes.

Return Value

An @fm-delimited list of attribute values based on the order passed in the <attributes> parameter.

Example 1

declare function RTI_OS_Directory
 
// returns an @fm delimited list of all the extended attributes for a file
directory = "c:\revsoft\oinsight"
filename = "readme.pdf"
result = rti_os_directory( "GetAttributes", directory, filename)

Example 2

declare function RTI_OS_Directory
 
// returns the size of the file requested
directory = "c:\revsoft\oinsight"
filename = "readme.pdf"
attributes = "size"
result = RTI_OS_Directory( "GetAttributes", directory, filename, attributes )

Example 3

declare function RTI_OS_Directory
 
// returns an @fm delimited list of attributes in the order in which they are requested
directory = "c:\revsoft\oinsight"
filename = "readme.pdf"
attributes = "size,kind,title"
result = RTI_OS_Directory( "GetAttributes", directory, filter, attributes)
  • No labels