FileAttributes

Description:

baFileAttributes returns the attributes of a file.

Platforms:

Windows and Macintosh

Usage:

Result = baFileAttributes( FileName )

Arguments:

String.
FileName is the file to get the attributes of.

Returns:

String.
Returns a string containing all the attributes that are set. Can be any combination of:

Windows

"r"

read-only

"a"

archive

"h"

hidden

"s"

system

Macintosh

"r"

locked

"h"

invisible

"s"

shared

"c"

custom icon

"t"

stationery pad

"l"

alias

"n"

name locked

"b"

has bundle

"i"

has been inited
Returns an empty string if FileName doesn't exist.

Examples:

Director:
att = baFileAttributes( "c:\data\student.dat" )

Authorware:
att := baFileAttributes( "c:\\data\\student.dat" )
 

Notes:

You can use the Director contains or Authorware Find function to test whether a particular attribute is set. eg.

if Find( "r" , baFileAttributes( FileName ) ) <> 0 then -- file is read only

if baFileAttributes( FileName ) contains "r" then -- file is read only
 

See also:

baSetFileAttributes