. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosGetFileAttribute(string FileName, string Attribute)

Returns an integer indicating whether the specified file or folder has the specified attribute as set or not set. 

Parameters:

FileName : A string indicating the drive, location and name of the file or folder to check for attributes. For example, "C:\Docs\MyDoc.txt" on Windows or "My Mac:Docs:My Doc" on MacOS. On Windows, all files and folders in the pathname may be specified by their Windows name or MS-DOS name. 
Attribute : A string specifying which attribute to check for. This parameter is case insensitive.
Possible Values :
"Read Only" : Returns whether the specified file is read only and cannot be written to. This does not apply to MacOS folders.
"Hidden" : Returns whether the specified file is hidden in Explorer on Windows and Finder on MacOS. Note that on Windows hidden files will still be visible if 'show all files' is selected. 
"Archive" : Returns whether the specified file is marked as an archive. Applications use this attribute to mark files for backup or removal. This does not apply to MacOS.
"System" : Returns whether the specified file is part of, or is used exclusively by, the operating system. This does not apply to MacOS or Windows folders.
"Temp" : Returns whether the specified file is being used for temporary storage. This does not apply to MacOS or Windows folders.
"Stationery" : Returns whether the specified file is a stationery file. This does not apply to Windows or MacOS folders.
"Bundle" : Returns whether the specified file has a "BNDL" resource. The "BNDL" resource is a resource that most applications contain that associates the application's documents with the application so that the application will automatically open when one of it's documents are double clicked. The "BNDL" resource also associates the application's documents with the appropriate icons. This does not apply to Windows or MacOS folders.
"Custom Icon" : Returns whether the specified file or folder has a custom icon. If this attribute is set for a file, it should contain one or more of the following resource types with a resource ID of -16455: "ICN", "icl4", "icl8", "ics", "ics4" and/or "ics8". If this attribute is set for a folder, it should contain an invisible file named "Icon" which should contain the resources mentioned above. This does not apply to Windows.
"Shared" : Returns whether the specified file has a "Shared" resource. The "Shared" resource determines if a file can be shared on a server or not. This does not apply to Windows or MacOS folders.
"Alias" : Returns whether the specified file has an "Alias" resource. The "Alias" resource determines if a file represents a shortcut to another file or folder. This does not apply to Windows or MacOS folders.
"Name Locked" : Returns whether the specified file has a "Name Locked" resource. The "Name Locked" resource determines if a file or folder can be renamed and icon changed from Finder or not. This does not apply to Windows.
"Inited" : Returns whether the specified file has an "Inited" resource. The "Inited" resource determines if a file has its info in the desktop database or not. This does not apply to Windows or MacOS folders.

Return Value : An integer indicating whether the specified attribute is on or off for the specified file. If 1 is returned, the specified attribute is set. If 0 is returned, the specified attribute is off or an error occurred. In this case, call dosGetLastError() to determine whether an error occurred or the specified attribute is not set. 

Possible Returned Error Codes via dosGetLastError() :
10002 : Invalid value for parameter 2. 
10014 : File expected, a reference to a drive or folder was given. A value for Attribute was passed that only applies to files when FileName refers to a folder.
10016 : File not found. 



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 2/18/2002 3:11:16 PM.