Server IP : 103.119.228.120 / Your IP : 18.218.75.58 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/share/man/man3/ |
Upload File : |
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Archive::Tar::File 3" .TH Archive::Tar::File 3 "2016-10-20" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Archive::Tar::File \- a subclass for in\-memory extracted file from Archive::Tar .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& my @items = $tar\->get_files; \& \& print $_\->name, \*(Aq \*(Aq, $_\->size, "\en" for @items; \& \& print $object\->get_content; \& $object\->replace_content(\*(Aqnew content\*(Aq); \& \& $object\->rename( \*(Aqnew/full/path/to/file.c\*(Aq ); .Ve .SH "DESCRIPTION" .IX Header "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 \s-1API\s0 as well. .SS "Accessors" .IX Subsection "Accessors" A lot of the methods in this package are accessors to the various fields in the tar header: .IP "name" 4 .IX Item "name" The file's name .IP "mode" 4 .IX Item "mode" The file's mode .IP "uid" 4 .IX Item "uid" The user id owning the file .IP "gid" 4 .IX Item "gid" The group id owning the file .IP "size" 4 .IX Item "size" File size in bytes .IP "mtime" 4 .IX Item "mtime" Modification time. Adjusted to mac-time on MacOS if required .IP "chksum" 4 .IX Item "chksum" Checksum field for the tar header .IP "type" 4 .IX Item "type" File type \*(-- numeric, but comparable to exported constants \*(-- see Archive::Tar's documentation .IP "linkname" 4 .IX Item "linkname" If the file is a symlink, the file it's pointing to .IP "magic" 4 .IX Item "magic" Tar magic string \*(-- not useful for most users .IP "version" 4 .IX Item "version" Tar version string \*(-- not useful for most users .IP "uname" 4 .IX Item "uname" The user name that owns the file .IP "gname" 4 .IX Item "gname" The group name that owns the file .IP "devmajor" 4 .IX Item "devmajor" Device major number in case of a special file .IP "devminor" 4 .IX Item "devminor" Device minor number in case of a special file .IP "prefix" 4 .IX Item "prefix" Any directory to prefix to the extraction path, if any .IP "raw" 4 .IX Item "raw" Raw tar header \*(-- not useful for most users .SH "Methods" .IX Header "Methods" .ie n .SS "Archive::Tar::File\->new( file => $path )" .el .SS "Archive::Tar::File\->new( file => \f(CW$path\fP )" .IX Subsection "Archive::Tar::File->new( file => $path )" Returns a new Archive::Tar::File object from an existing file. .PP Returns undef on failure. .ie n .SS "Archive::Tar::File\->new( data => $path, $data, $opt )" .el .SS "Archive::Tar::File\->new( data => \f(CW$path\fP, \f(CW$data\fP, \f(CW$opt\fP )" .IX Subsection "Archive::Tar::File->new( data => $path, $data, $opt )" Returns a new Archive::Tar::File object from data. .PP \&\f(CW$path\fR defines the file name (which need not exist), \f(CW$data\fR the file contents, and \f(CW$opt\fR is a reference to a hash of attributes which may be used to override the default attributes (fields in the tar header), which are described above in the Accessors section. .PP Returns undef on failure. .ie n .SS "Archive::Tar::File\->new( chunk => $chunk )" .el .SS "Archive::Tar::File\->new( chunk => \f(CW$chunk\fP )" .IX Subsection "Archive::Tar::File->new( chunk => $chunk )" Returns a new Archive::Tar::File object from a raw 512\-byte tar archive chunk. .PP Returns undef on failure. .ie n .SS "$bool = $file\->extract( [ $alternative_name ] )" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->extract( [ \f(CW$alternative_name\fP ] )" .IX Subsection "$bool = $file->extract( [ $alternative_name ] )" Extract this object, optionally to an alternative name. .PP See \f(CW\*(C`Archive::Tar\->extract_file\*(C'\fR for details. .PP Returns true on success and false on failure. .ie n .SS "$path = $file\->full_path" .el .SS "\f(CW$path\fP = \f(CW$file\fP\->full_path" .IX Subsection "$path = $file->full_path" Returns the full path from the tar header; this is basically a concatenation of the \f(CW\*(C`prefix\*(C'\fR and \f(CW\*(C`name\*(C'\fR fields. .ie n .SS "$bool = $file\->validate" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->validate" .IX Subsection "$bool = $file->validate" Done by Archive::Tar internally when reading the tar file: validate the header against the checksum to ensure integer tar file. .PP Returns true on success, false on failure .ie n .SS "$bool = $file\->has_content" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->has_content" .IX Subsection "$bool = $file->has_content" Returns a boolean to indicate whether the current object has content. Some special files like directories and so on never will have any content. This method is mainly to make sure you don't get warnings for using uninitialized values when looking at an object's content. .ie n .SS "$content = $file\->get_content" .el .SS "\f(CW$content\fP = \f(CW$file\fP\->get_content" .IX Subsection "$content = $file->get_content" Returns the current content for the in-memory file .ie n .SS "$cref = $file\->get_content_by_ref" .el .SS "\f(CW$cref\fP = \f(CW$file\fP\->get_content_by_ref" .IX Subsection "$cref = $file->get_content_by_ref" Returns the current content for the in-memory file as a scalar reference. Normal users won't need this, but it will save memory if you are dealing with very large data files in your tar archive, since it will pass the contents by reference, rather than make a copy of it first. .ie n .SS "$bool = $file\->replace_content( $content )" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->replace_content( \f(CW$content\fP )" .IX Subsection "$bool = $file->replace_content( $content )" Replace the current content of the file with the new content. This only affects the in-memory archive, not the on-disk version until you write it. .PP Returns true on success, false on failure. .ie n .SS "$bool = $file\->rename( $new_name )" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->rename( \f(CW$new_name\fP )" .IX Subsection "$bool = $file->rename( $new_name )" Rename the current file to \f(CW$new_name\fR. .PP Note that you must specify a Unix path for \f(CW$new_name\fR, since per tar standard, all files in the archive must be Unix paths. .PP Returns true on success and false on failure. .ie n .SS "$bool = $file\->chmod $mode)" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->chmod \f(CW$mode\fP)" .IX Subsection "$bool = $file->chmod $mode)" Change mode of \f(CW$file\fR to \f(CW$mode\fR. The mode can be a string or a number which is interpreted as octal whether or not a leading 0 is given. .PP Returns true on success and false on failure. .ie n .SS "$bool = $file\->chown( $user [, $group])" .el .SS "\f(CW$bool\fP = \f(CW$file\fP\->chown( \f(CW$user\fP [, \f(CW$group\fP])" .IX Subsection "$bool = $file->chown( $user [, $group])" Change owner of \f(CW$file\fR to \f(CW$user\fR. If a \f(CW$group\fR is given that is changed as well. You can also pass a single parameter with a colon separating the use and group as in 'root:wheel'. .PP Returns true on success and false on failure. .SH "Convenience methods" .IX Header "Convenience methods" To quickly check the type of a \f(CW\*(C`Archive::Tar::File\*(C'\fR object, you can use the following methods: .ie n .IP "$file\->is_file" 4 .el .IP "\f(CW$file\fR\->is_file" 4 .IX Item "$file->is_file" Returns true if the file is of type \f(CW\*(C`file\*(C'\fR .ie n .IP "$file\->is_dir" 4 .el .IP "\f(CW$file\fR\->is_dir" 4 .IX Item "$file->is_dir" Returns true if the file is of type \f(CW\*(C`dir\*(C'\fR .ie n .IP "$file\->is_hardlink" 4 .el .IP "\f(CW$file\fR\->is_hardlink" 4 .IX Item "$file->is_hardlink" Returns true if the file is of type \f(CW\*(C`hardlink\*(C'\fR .ie n .IP "$file\->is_symlink" 4 .el .IP "\f(CW$file\fR\->is_symlink" 4 .IX Item "$file->is_symlink" Returns true if the file is of type \f(CW\*(C`symlink\*(C'\fR .ie n .IP "$file\->is_chardev" 4 .el .IP "\f(CW$file\fR\->is_chardev" 4 .IX Item "$file->is_chardev" Returns true if the file is of type \f(CW\*(C`chardev\*(C'\fR .ie n .IP "$file\->is_blockdev" 4 .el .IP "\f(CW$file\fR\->is_blockdev" 4 .IX Item "$file->is_blockdev" Returns true if the file is of type \f(CW\*(C`blockdev\*(C'\fR .ie n .IP "$file\->is_fifo" 4 .el .IP "\f(CW$file\fR\->is_fifo" 4 .IX Item "$file->is_fifo" Returns true if the file is of type \f(CW\*(C`fifo\*(C'\fR .ie n .IP "$file\->is_socket" 4 .el .IP "\f(CW$file\fR\->is_socket" 4 .IX Item "$file->is_socket" Returns true if the file is of type \f(CW\*(C`socket\*(C'\fR .ie n .IP "$file\->is_longlink" 4 .el .IP "\f(CW$file\fR\->is_longlink" 4 .IX Item "$file->is_longlink" Returns true if the file is of type \f(CW\*(C`LongLink\*(C'\fR. Should not happen after a successful \f(CW\*(C`read\*(C'\fR. .ie n .IP "$file\->is_label" 4 .el .IP "\f(CW$file\fR\->is_label" 4 .IX Item "$file->is_label" Returns true if the file is of type \f(CW\*(C`Label\*(C'\fR. Should not happen after a successful \f(CW\*(C`read\*(C'\fR. .ie n .IP "$file\->is_unknown" 4 .el .IP "\f(CW$file\fR\->is_unknown" 4 .IX Item "$file->is_unknown" Returns true if the file type is \f(CW\*(C`unknown\*(C'\fR