MSG_NOTIFY_FILE_CHANGE

DerrickRe@aol.com
Sun, 16 Mar 1997 23:30:21 -0500 (EST)

Does anyone now how to get GeoManager to recognize a change in file
information.

I think Ihave to send out a MSG_NOTIFY_FILE_CHANGE. The headers (gcnlist.def
& gcnlist.goh) show that you have to:

@importMessage MetaGCNMessages, void MSG_NOTIFY_FILE_CHANGE(
FileChangeNotificationType notifyType = dx,
MemHandle data = bp); /* FileChangeNotificationData */

FileChangeNotificationType etype word
FCNT_RENAME enum FileChangeNotificationType
; File or directory renamed. FCND_id is the identifier for the file or
; directory, and FCND_name is its new name.

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;

>From the above I know I have to send a MSG_NOTIFY_FILE_CHANGE(FCNT_RENAME,
MemHandle of a FileChangeNotificationData)

of the FileChangeNotificationData I have the FCND_disk handle and FCND_name
of the new directory name.

BUT... I don't know how to get a FileID for FCND_id. Further in the headers
(file,h & file.def) there is an undocumented routine:

extern ChunkHandle /*XXX*/
_pascal FileGetCurrentPathIDs(MemHandle block);

typedef dword FileID;
typedef struct { /* Element of array returned by FileGetCurrentPathIDs */
word FPID_disk; /* disk handle */
FileID FPID_id; /* id for path on that disk */
} FilePathID;

I'm just not sure how to put it all together, or if there is an easier way,
and like I say all the documentation thru to ver 3.0 is completely wrong.