StartNotify / EndNotify

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
lazi
Posts: 361
Joined: Thu Feb 24, 2011 11:08 pm

StartNotify / EndNotify

Post by lazi » Tue Dec 18, 2018 10:53 am

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.

User avatar
airsoftsoftwair
Posts: 3185
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: StartNotify / EndNotify

Post by airsoftsoftwair » Thu Dec 27, 2018 12:33 pm

Hmm, what on earth do you need this for? :)

User avatar
lazi
Posts: 361
Joined: Thu Feb 24, 2011 11:08 pm

Re: StartNotify / EndNotify

Post by lazi » Thu Dec 27, 2018 2:07 pm

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.

User avatar
jPV
Posts: 279
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: StartNotify / EndNotify

Post by jPV » Thu Dec 27, 2018 8:15 pm

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 :)

User avatar
airsoftsoftwair
Posts: 3185
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: StartNotify / EndNotify

Post by airsoftsoftwair » Thu Dec 27, 2018 11:29 pm

Well, on Amigaoids, Windows, and macOS this is probably not too difficult to implement, but then there's always Linux of course :roll:

User avatar
airsoftsoftwair
Posts: 3185
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: StartNotify / EndNotify

Post by airsoftsoftwair » Sat Jan 19, 2019 5:45 pm

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

User avatar
r-tea
Posts: 123
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Re: StartNotify / EndNotify

Post by r-tea » Tue Jan 22, 2019 6:42 pm

Looks like the new version is closer than we think :)

Post Reply