Hello,

I am happy to announce that AdvNotify 1.3 is out, all the known
Perl for Win32 versions from 5.003 and up are supported by this
object oriented Perl module.

Description:

With this object oriented Perl module you will be able  to  monitor 
the changes on your directories, this allows your Perl application to
respond to changes in the file system, such as new file and/or directory
creation, renaming, size, attribute, and time changes, etc. Also, with 
AdvNotify you can run multiple threads from inside your Perl application
to monitor the file system changes, with AdvNotify you will be notified 
of wich file has been changed. The AdvNotify's interface has been carefully
designed to be very easy to use. 

Operating systems:

WinNT 4.0 (SP3) or later..


Implemented methods:

    StartThread
    Wait
    Read
    SendSignal
    EnableWatch
    DisableWatch
    Terminate
    KeyPressed
    TextColor
    ClrScr


A Win32::AdvNotify example:

################################################

#!perl -w

use Win32::AdvNotify qw(FILE_NAME SIZE INFINITE Yes No All 
%ActionName %ActionColor %EventName);

my $obj = new Win32::AdvNotify()|| die "Can't create object\n";

# Now we will start two threads 
# Note: you can start more threads... 

my $thread1 = $obj->StartThread(Directory => "q:\\Win32\\", 
Filter => All ,
WatchSubtree => Yes ) || die "Can't start thread\n";
my $thread2 = $obj->StartThread(Directory => "q:\\Unix\\", 
Filter => All , 
WatchSubtree => Yes ) || die "Can't start thread\n";

$thread1->EnableWatch() || die "Problem starting EnableWatch()\n"; 
$thread2->EnableWatch() || die "Problem starting EnableWatch()\n";

while($obj->Wait(INFINITE))
{while($obj->Read(\@data)) 
{for($i=0;$i<=$#data;$i++)
{$obj->TextColor($ActionColor{$data[$i]->{Action}});
print $data[$i]->{Directory}.$data[$i]->{FileName}." ".
$ActionName{$data[$i]->{Action}}." on ".$data[$i]->{DateTime}."\n";}}}

print "\nThe signal is: ".$EventName{$obj->{EVENT}}."\n";

# don't forget to terminate your threads. 

$thread1->Terminate(); # terminate thread1
$thread2->Terminate(); # terminate thread2

# Don't forget to call the destructor

undef $obj;

#################################################



You can find the new documentation at:
http://www.generation.net/~aminer/Perl/AdvNotify.html

And you can download the new NTFS 1.0 from:
http://www.generation.net/~aminer/Perl/


Enjoy !

Sincerely,
Amine.




_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to