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.614.138 Times

Archive::Ar 1.13b

  Date Added: June 21, 2010  |  Visits: 935


Report Broken Link
Printer Friendly Version

Product Homepage
Download (78 downloads)

Archive::Ar is a Perl interface for manipulating ar archives. SYNOPSIS use Archive::Ar; my $ar = new Archive::Ar("./"); $ar->add_data("newfile.txt","Some contents", $properties); $ar->add_files("./bar.tar.gz", "") $ar->add_files(["./again.gz"]); $ar->remove("file1", "file2"); $ar->remove(["file1", "file2"); my $filedata = $ar->get_content("bar.tar.gz"); my @files = $ar->list_files(); $ar->read("foo.deb"); $ar->write(""); $ar->DEBUG(); Archive::Ar is a pure-perl way to handle standard ar archives. This is useful if you have those types of old archives on the system, but it is also useful because .deb packages for the Debian GNU/Linux distribution are ar archives. This is one building block in a future chain of modules to build, manipulate, extract, and test debian modules with no platform or architecture dependence. You may notice that the API to Archive::Ar is similar to Archive::Tar, and this was done intentionally to keep similarity between the Archive::* modules Class Methods new() new($filename) new(*GLOB,$debug) Returns a new Archive::Ar object. Without a filename or glob, it returns an empty object. If passed a filename as a scalar or in a GLOB, it will attempt to populate from either of those sources. If it fails, you will receive undef, instead of an object reference. This also can take a second optional debugging parameter. This acts exactly as if DEBUG() is called on the object before it is returned. If you have a new() that keeps failing, this should help. read($filename) read(*GLOB); This reads a new file into the object, removing any ar archive already represented in the object. Any calls to DEBUG() are not lost by reading in a new file. Returns the number of bytes read, undef on failure. read_memory($data) This read information from the first parameter, and attempts to parse and treat it like an ar archive. Like read(), it will wipe out whatever you have in the object and replace it with the contents of the new archive, even if it fails. Returns the number of bytes read (processed) if successful, undef otherwise. list_files() This lists the files contained inside of the archive by filename, as an array. add_files("filename1", "filename2") add_files(["filename1", "filename2"]) Takes an array or an arrayref of filenames to add to the ar archive, in order. The filenames can be paths to files, in which case the path information is stripped off. Filenames longer than 16 characters are truncated when written to disk in the format, so keep that in mind when adding files. Due to the nature of the ar archive format, add_files() will store the uid, gid, mode, size, and creation date of the file as returned by stat(); add_files() returns the number of files successfully added, or undef on failure. add_data("filename", $filedata) Takes an filename and a set of data to represent it. Unlike add_files, add_data is a virtual add, and does not require data on disk to be present. The data is a hash that looks like: $filedata = { "data" => $data, "uid" => $uid, #defaults to zero "gid" => $gid, #defaults to zero "date" => $date, #date in epoch seconds. Defaults to now. "mode" => $mode, #defaults to "100644"; } You cannot add_data over another file however. This returns the file length in bytes if it is successful, undef otherwise. write() write("") This method will return the data as an .ar archive, or will write to the filename present if specified. If given a filename, write() will return the length of the file written, in bytes, or undef on failure. If the filename already exists, it will overwrite that file. get_content("filename") This returns a hash with the file content in it, including the data that the file would naturally contain. If the file does not exist or no filename is given, this returns undef. On success, a hash is returned with the following keys: name - The file name date - The file date (in epoch seconds) uid - The uid of the file gid - The gid of the file mode - The mode permissions size - The size (in bytes) of the file data - The contained data remove("filename1", "filename2") remove(["filename1", "filename2"]) The remove method takes a filenames as a list or as an arrayref, and removes them, one at a time, from the Archive::Ar object. This returns the number of files successfully removed from the archive. DEBUG() This method turns on debugging. Optionally this can be done by passing in a value as the second parameter to new. While verbosity is enabled, Archive::Ar will toss a warn() if there is a suspicious condition or other problem while proceeding. This should help iron out any problems you have while using the module..

Requirements: No special requirements
Platforms: Linux
Keyword: Ar Ar Archive Ar- Archivear Data Debug File Filename Files Glob Libraries Programming
Users rating: 0/10

License: Freeware Size: 6.14 KB
More Reviews or Write Review

Compression Tools  -  CyberArchive 1.1
Cyber Archive is a data compression and archival program demonstrating the Cyber Compression Suite and data compression services. Visit the Cyber Operations website for more information on Cyber Archive. Using our large array of compression...
647.1 KB  
File Cataloguers  -  File List Generator 1.0
ReStoring Data's File List Generator Freeware software filters, prints, and organizes via a file's: name, type, size, created date, and date last modified. It was developed by the Research and Development team to aid data recovery service clients...
5.63 MB  
File Utilities  -  FRET 0.0.6
FRET is a *nix command line tool that examines any file or files and attempts to identify the data structures and patterns within those file(s). FRET project does this by firstly scanning files using heuristic algorithms to identify structures...
460.8 KB  
Libraries  -  Audio::File::Type 0.10
Audio::File::Type represents an audio filetype. An instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio...
74.75 KB  
Libraries  -  Tie::Layers 0.06
SYNOPSIS ##### # Subroutines # use Tie::Layers qw(is_handle config); $yes = is_handle( $file_handle ); ($key, $old_value) = config(%options, $key); ($key, $old_value) = config(%options, $key => $new_value ); #### # Config default...
71.68 KB  
Libraries  -  File::Next::OO 0.04
File::Next::OO is a Perl module with file-finding iterator Wrapper for File::Next::files function. SYNOPSIS File::Next::OO is just a wrapper around File::Next::files function. But it is easy to remember and less typing. Call it always with...
8.19 KB  
Libraries  -  File::Xcopy 0.12
File::Xcopy can copy files after comparing them. SYNOPSIS use File::Xcopy; my $fx = new File::Xcopy; $fx->from_dir("/from/dir"); $fx->to_dir("/to/dir"); $fx->fn_pat((.pl|.txt)$); # files with pl & txt extensions $fx->param(s,1); # search...
15.36 KB  
Libraries  -  File::Remote 1.17
File::Remote is a Perl module to read/write/edit remote files transparently. SYNOPSIS # # Two ways to use File::Remote # # First, the function-based style. Here, we can use the # special :replace tag to overload Perl builtins! # use...
15.36 KB  
Libraries  -  MP3::Tag::ParseData 0.9709
MP3::Tag::ParseData is a Perl module for parsing arbitrary data associated with music files. SYNOPSIS # parses the file name according to one of the patterns: $mp3->config(parse_data, [i, %f, %t - %n - %a.%e, %t - %y.%e]); $title =...
174.08 KB  
Libraries  -  NDBM_File 5.8.8
NDBM_File is a Perl module that allows tied access to ndbm files. SYNOPSIS use Fcntl; # For O_RDWR, O_CREAT, etc. use NDBM_File; tie(%h, NDBM_File, filename, O_RDWR|O_CREAT, 0666) or die "Couldnt tie NDBM file filename: $!; aborting"; #...
12.2 MB  
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, 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