Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.618.980 Times

File::Find::Parallel 0.0.4

  Date Added: January 07, 2010  |  Visits: 1.014

File::Find::Parallel

Report Broken Link
Printer Friendly Version


Product Homepage
Download (74 downloads)



File::Find::Parallel allows you to traverse a number of similar directories in parallel. SYNOPSIS use File::Find::Parallel; my $ffp = File::Find::Parallel->new( qw( /foo /bar ) ); print "Union:n"; my $union = $ffp->any_iterator print " $_n" while $_ = $union->(); print "Intersection:n"; my $inter = $ffp->all_iterator print " $_n" while $_ = $inter->(); File::Find is the ideal tool for quickly scanning a single directory. But sometimes its nice to be able to perform operations on multiple similar directories in parallel. Perhaps you need to compare the contents of two directories or convert files that are shared in more than one directory into hard links. This module manufactures iterators that visit each file and directory in either the union or the intersection of a number of directories. Hmm. What does that mean? Given two directory trees like this foo foo/a foo/b/c foo/d bar bar/a bar/b bar/e you can choose to work with the intersection of the two directory structures: . ./a ./b That is the subdirectories and files that the foo and bar share. Alternately you can work with the union of the two directory structures: . ./a ./b ./b/c ./d ./e Still not clear? Well, if you wanted to do a recursive diff on the two directories youd iterate their union so you could report files that were present in foo but missing from bar and vice-versa. If, on the other hand you wanted to scan the directories and find all the files that are common to all of them youd iterate their intersection and receive only files and directories that were present in all the directories being scanned. The any_iterator and all_iterator are built on a more general purpose method: want_iterator. If, for example, you want to make links between files that are found in more than one directory you might get your iterator like this: my $iter = $ffp->want_iterator( 2 ); The apparently magic 2 reflects the fact that if youre going to be making links you need at least two files. No matter how many directories you are iterating over in parallel you will only see files and directories that appear in at least two of those directories. File::Find::Parallel can scan any number of directories at the same time. Heres an example (on Unix systems) that returns the list of all files and directories that are contained in all home directories. use File::Glob :glob; use File::Find::Parallel; my $find = File::Find::Parallel->new( bsd_glob( /home/* ) ); my @common = ( ); my $iter = $find->all_iterator; while ( defined my $obj = $iter->() ) { push @common, $obj; } print "The following files are common to ", "all directories below /home :n"; print " $_n" for @common; For a complete concrete example of its use see lncopies in the bin subdirectory of this distribution. Iterators The iterator returned by any_iterator, all_iterator or want_iterator is a code reference. Call it to get the next file or directory. When all files and directories have been returned the iterator will return undef. Once created an iterator is independent of the File::Find::Parallel object that created it. If the object goes out of scope and is destroyed during the life of the iterator it will still function normally. You may have many active iterators for a single File::Find::Parallel object at any time..

Requirements: No special requirements
Platforms: Linux
Keyword: Directories Directory Filefindparallel Files Iterator Libraries Number Print Programming
Users rating: 0/10

License: Freeware Size: 9.22 KB
USER REVIEWS
More Reviews or Write Review


FILE::FIND::PARALLEL RELATED
Miscellaneous  -  IDV Directory Viewer 1.0
IDV (IDV Directory Viewer) is a web application written in PHP for navigating through directories and browsing files on an HTTP server. It outputs file listings that are much like those automatically generated by web servers, such as Apache; but...
 
Utilities  -  Print Directory Feature 1.0
The Print Directory Feature adds or removes the Print Directory feature for folders in Windows XP and in Windows Vista based on Microsoft's article number 321379.
204 KB  
Audio Tools  -  XMMS Album List 2.2-1
XMMS Album List is a Unix application for loading directories of audio files into XMMS, similar in concept to the Winamp plugin AlbumList. XMMS Album List is written in Perl using Gtk2-Perl, MP3::Info, and Xmms::Perl (the latter being available on...
9.22 KB  
Libraries  -  Apache::MP3::Playlist 4.00
Apache::MP3::Playlist can manage directories of MP3 files with sorting and persistent playlists. SYNOPSIS # httpd.conf or srm.conf AddType audio/mpeg mp3 MP3 # httpd.conf or access.conf SetHandler perl-script...
327.68 KB  
Modules  -  Feeds directory fetcher 6.x-1.1
This is a very simple little module that provides a new feeds fetcher to the feeds module that fetches new files from a directory of files.All you need to do is point it at a directory on your webserver, and it will fetch a new file if one is...
10 KB  
Libraries  -  Apache::MP3::Sorted 4.00
Apache::MP3::Sorted is a Perl module to generate sorted streamable directories of MP3 files. SYNOPSIS # httpd.conf or srm.conf AddType audio/mpeg mp3 MP3 # httpd.conf or access.conf SetHandler perl-script PerlHandler...
327.68 KB  
Utilities  -  Java FileTools 0.3.0
A set of tools written in Java to manipulate files, finding duplicated files into two directories, finding duplicated files in a single directory, finding duplicated files out and in .ZIP files, etc.
7.1 KB  
Development Tools  -  PID and State Feedback Control of DC Motors 1.0
The files include a number of Simulink(R) models with different controllers for a DC motor. There is also a document included that describes the different controllers PID and pole placement with state feedback. The models can serve as a starting...
6.69 MB  
Audio Tools  -  xalbumlist 2.0
xalbumlist is a Unix application for loading directories of audio files into XMMS, similar in concept to the Winamp plugin AlbumList. It is written in Perl using Gtk2-Perl, MP3::Info, and Xmms::Perl (the latter being available on CPAN)
10.24 KB  
Development Editors  -  exifstats for Linux 1.1.0.0
exifstats -- a command line tool for gathering and displaying data about how your photos were taken. Such data may include the shutter speed, focal length and aperture and much more, and is stored in the image files according to the EXIF standard....
163.84 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB