info > Archive::Tar::File

📋 NAME

Archive::Tar::File - a subclass for in-memory extracted file from Archive::Tar

🚀 Quick Reference

Use CaseCommandDescription
📦 Get file list from archivemy @items = $tar->get_files;Retrieve list of Archive::Tar::File objects
📄 Get file name$_->nameReturn the file's name from the tar header
💾 Get file size$_->sizeReturn the file's size in bytes
📥 Extract a file$file->extract();Extract the file to disk (optionally with alternative name)
📖 Get file content$file->get_content;Return the in-memory content of the file
✏️ Replace content$file->replace_content('new content');Replace the current content of the file
🔄 Rename file$file->rename('new/path/file.c');Rename the file to a new Unix path
🔐 Change mode$file->chmod(0644);Change the file's mode (octal number or string)
👤 Change owner$file->chown('root', 'wheel');Change the file's owner and optionally group
🔍 Validate header$file->validate;Check the tar header checksum for integrity
✅ Check file type$file->is_fileReturns true if the file is a regular file

📖 SYNOPSIS

my @items = $tar->get_files;

print $_->name, ' ', $_->size, "\n" for @items;

print $object->get_content;
$object->replace_content('new content');

$object->rename( 'new/full/path/to/file.c' );

📝 DESCRIPTION

Archive::Tar::Files provides a neat little object layer for in-memory extracted files. It's mostly used internally in Archive::Tar to tidy up the code, but there's no reason users shouldn't use this API as well.

🔍 Accessors

A lot of the methods in this package are accessors to the various fields in the tar header:

⚙️ Methods

🧩 Convenience methods

To quickly check the type of a "Archive::Tar::File" object, you can use the following methods:

perl v5.34.0 2026-06-23 Archive::Tar::File(3perl)

Archive::Tar::File
📋 NAME 🚀 Quick Reference 📖 SYNOPSIS 📝 DESCRIPTION
🔍 Accessors ⚙️ Methods 🧩 Convenience methods

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-24 04:51 @216.73.216.102
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!