forcing refresh of folder
forcing refresh of folder
- Subject: forcing refresh of folder
- From: Gregory Van Vooren <email@hidden>
- Date: Tue, 22 Jun 2010 23:20:56 +0200
Hi,
I'm working on a client/server application in which the client needs to copy one or more files to a folder on the server. However, while the destination folder exists, the file system doesn't seem to be aware of it until much later. Is there some way to force a refresh?
Here's the setup:
On the client the server share //server/container is mounted (over AFP)
The client issues an http request to the server, causing the server to create the folder //server/container/parent/xxxxx (the "parent" folder existed at the moment the share was mounted, the "xxxxx" folder is freshly created). The path to the newly created folder is returned in the http response.
From this response I try to construct an FSRef, but this fails (on failure I wait one second and then try again; i repeated this cycle up to 20 times). Creating an FSRef to the parent folder succeeds. (both are creating through subsequent calls to FSMakeFSRefUnicode).
Up to this point I would think this is an ordinary refresh problem, but there's more going on:
* If i issue a second request without terminating my client program creation of the FSRef to //server/container/parent/xxxxx succeeds (even though xxxxx is different from the previous one)
* If a finder window showing /server/container/parent is open at that time, creation of the FSRef to /server/container/parent/xxxxx will succeed after 5 to 6 seconds even on the first request.
I tried calling FNNotify on parent (in the client), but that didn't seem to help.
The behavior described above leads me to think finder somehow issues system calls I don't know about to get the folder refreshed more quickly.
Does anyone have an idea on a fix for this problem?
Thanks in advance.
Kind regards,
Greg.
P.S. For info: in the particular case exhibiting this problem the server is a windows XP machine that can be shared over AFP, while the clients used are running OS X 10.5 or 10.6. Under normal circumstances however the client has no knowledge of the server's architecture. The server never knows anything about the connected client(s).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden