Up: GEOS SDK TechDocs| Up | Prev: FALSE ... | Next: FileDate ...

FileAttrs

typedef ByteFlags FileAttrs;
#define FA_ARCHIVE						0x20
#define FA_SUBDIR 						0x10
#define FA_VOLUME 						0x8
#define FA_SYSTEM	 					0x4
#define FA_HIDDEN 						0x2
#define FA_RDONLY 						0x1
#define FILE_ATTR_NORMAL 						0
#define FILE_ATTR_READ_ONLY	 					FA_RDONLY
#define FILE_ATTR_HIDDEN 						FA_HIDDEN
#define FILE_ATTR_SYSTEM 						FA_SYSTEM
#define FILE_ATTR_VOLUME_LABEL 						FA_VOLUME

Every DOS or GEOS file has certain attributes. These attributes mark such things as whether the file is read-only. With GEOS files, the attributes can be accessed by using the extended attribute FEA_FILE_ATTR. You can also access any file's standard attributes with the routines FileGetAttributes() and FileSetAttributes(); these routines work for both GEOS files and plain DOS files.

The FileAttrs field contains the following bits:

FA_ARCHIVE
This flag is set if the file requires backup. Backup programs typically clear this bit.
FA_SUBDIR
This flag is set if the "file" is actually a directory. Geodes may not change this flag.
FA_VOLUME
This flag is set if the "file" is actually the volume label. This flag will be off for all files a geode will ever see. Geodes may not change this flag.
FA_SYSTEM
This flag is set if the file is a system file. Geodes should not change this bit.
FA_HIDDEN
This flag is set if the file is hidden.
FA_RDONLY
This flag is set if the file is read-only.

See Also: FileGetAttributes(),FileSetAttributes().

Include: file.h

FileChangeNotificationData

typedef struct {
word    	FCND_disk; 	/* Handle for disk on which change occurred */
FileID  	FCND_id;   	/* ID of affected file or containing dir,
				 * as appropriate to notification type */
FileLongName    FCND_name;	/* Name of file, if appropriate (FCNT_CREATE,
				 * FCNT_RENAME, and FCNT_OPEN only) */
} FileChangeNotificationData;

 

FileChangeType

typedef ByteEnum FileChangeType;
#define FCT_CREATE				0
#define FCT_DELETE 				1
#define FCT_RENAME 				2
#define FCT_CONTENTS 				3
#define FCT_DISK_FORMAT 				4

 

FileCopyrightNotice

typedef char FileCopyrightNotice[GFH_NOTICE_SIZE];

 

FileCreateFlags

typedef WordFlags FileCreateFlags;
#define FCF_NATIVE				0x8000
#define FCF_MODE				0x0300 /* Filled with FILE_CREATE_* constant */
#define FCF_ACCESS				0x00ff /* Filled with FileAccessFlags */

The lower byte of this field is a FileAccessFlags record. This specifies the file's permissions and exclusions. Note that you must request write or read/write permission when you create a file. The upper byte specifies how the file should be created. It contains the following possible values:

FILE_CREATE_TRUNCATE
If a file with the given name exists, it should be opened and truncated; that is, all data should be deleted.
FILE_CREATE_NO_TRUNCATE
If the file exists, it should be opened without being truncated.
FILE_CREATE_ONLY
If the file exists, the routine should fail and set the thread's error value to ERROR_FILE_EXISTS.
FCF_NATIVE
This flag is combined with one of the above flags if the file should be created in the device's native format; e.g. if it should be a DOS file instead of a GEOS file. The name passed must be an acceptable native file name. If a GEOS file with the specified name already exists, FileCreate() will fail with error condition ERROR_FILE_FORMAT_MISMATCH. Similarly, if the flag isn't set and a non-GEOS file with this name exists, FileCreate() will fail and return this error.

Up: GEOS SDK TechDocs| Up | Prev: FALSE ... | Next: FileDate ...