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 36.961.824 Times

File::Find::Parallel 0.0.4

  Date Added: January 07, 2010  |  Visits: 1.311


Report Broken Link
Printer Friendly Version

Product Homepage
Download (81 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
More Reviews or Write Review

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  
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...
Programming  -  DRF - Directory Recursive Files 0.5
Java Library find all files in a root directory and all its sub folders
99.34 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  
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  
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  
Utilities  -  makeself 2.1.4 is a small shell script that generates a self-extractable tar.gz archive from a directory. The resulting file appears as a shell script (many of those have a .run suffix), and can be launched as is. The archive will then uncompress...
35.84 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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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