Is it possible a platform wide support of file change notification?
As Amiga does it via dos.library/StartNotify, EndNotify.
dos.library/StartNotify dos.library/StartNotify
NAME
StartNotify -- Starts notification on a file or directory. (V36)
SYNOPSIS
int32 success = StartNotify(struct NotifyRequest *notifystructure);
FUNCTION
Posts a notification request. Do not modify the notify structure
while it is active. You will be notified when the file or directory
changes. For files, you will be notified after the file is closed.
Not all filesystems will support this: applications should NOT
require it. In particular, most network filesystems won't support it.
StartNotify / EndNotify
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: StartNotify / EndNotify
Hmm, what on earth do you need this for?
Re: StartNotify / EndNotify
Hello Andreas!
I am often using my own image viewer which has a thumbnail strip. When an image is edited externally for example with ImageFX and saved back to the same file the questioned feature should let the imageviewer automatically reload the changed image for displaying and adapting thumbnail.
However other use cases may be imaginable.
Do not know how other systems can benefit from such thing, especially because my rough experiences tells me that on 'other' systems a file keeping opened is a widespread habit.
I am often using my own image viewer which has a thumbnail strip. When an image is edited externally for example with ImageFX and saved back to the same file the questioned feature should let the imageviewer automatically reload the changed image for displaying and adapting thumbnail.
However other use cases may be imaginable.
Do not know how other systems can benefit from such thing, especially because my rough experiences tells me that on 'other' systems a file keeping opened is a widespread habit.
Re: StartNotify / EndNotify
I can see some cases it would be handy.
I've been asked to code some sort of filemanager and there it would be needed to see if the displayed directory is changed (never promised to do it though, but maybe someone else would at least). Or if doing some sort of checks if something needs processing, for example, if you want to process files appearing in a download dir, or anything similar... notify would be more elegant than periodical polling. Or for info screen kind of displays which could update their displays when datafiles get changed etc (score boards etc)...
BTW. MorphOS got the WaitForNotification shell command in the 3.10 update this year, and it's a handy command.. and built-in command in Hollywood would be even more handy
I've been asked to code some sort of filemanager and there it would be needed to see if the displayed directory is changed (never promised to do it though, but maybe someone else would at least). Or if doing some sort of checks if something needs processing, for example, if you want to process files appearing in a download dir, or anything similar... notify would be more elegant than periodical polling. Or for info screen kind of displays which could update their displays when datafiles get changed etc (score boards etc)...
BTW. MorphOS got the WaitForNotification shell command in the 3.10 update this year, and it's a handy command.. and built-in command in Hollywood would be even more handy
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: StartNotify / EndNotify
Well, on Amigaoids, Windows, and macOS this is probably not too difficult to implement, but then there's always Linux of course
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: StartNotify / EndNotify
Well, here are you, now go and write a file manager with Hollywood
Code: Select all
- New: Added MonitorDirectory() function; this allows you to monitor all changes in a directory and get
notified as soon as something changes through the new "DirectoryChanged" listener that you can install
using InstallEventHandler(); note that this function might not work correctly on network drives
Re: StartNotify / EndNotify
Looks like the new version is closer than we think