403Webshell
Server IP : 103.119.228.120  /  Your IP : 18.119.192.2
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/ssl/local/ssl/local/ssl/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/local/ssl/local/share/man/man3/Template::Plugin::File.3pm
.\" 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 "Template::Plugin::File 3"
.TH Template::Plugin::File 3 "2014-04-24" "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"
Template::Plugin::File \- Plugin providing information about files
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 4
\&    [% USE File(filepath) %]
\&    [% File.path %]         # full path
\&    [% File.name %]         # filename
\&    [% File.dir %]          # directory
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This plugin provides an abstraction of a file.  It can be used to 
fetch details about files from the file system, or to represent abstract
files (e.g. when creating an index page) that may or may not exist on 
a file system.
.PP
A file name or path should be specified as a constructor argument.  e.g.
.PP
.Vb 3
\&    [% USE File(\*(Aqfoo.html\*(Aq) %]
\&    [% USE File(\*(Aqfoo/bar/baz.html\*(Aq) %]
\&    [% USE File(\*(Aq/foo/bar/baz.html\*(Aq) %]
.Ve
.PP
The file should exist on the current file system (unless \f(CW\*(C`nostat\*(C'\fR
option set, see below) as an absolute file when specified with as
leading '\f(CW\*(C`/\*(C'\fR' as per '\f(CW\*(C`/foo/bar/baz.html\*(C'\fR', or otherwise as one relative
to the current working directory.  The constructor performs a \f(CW\*(C`stat()\*(C'\fR
on the file and makes the 13 elements returned available as the plugin
items:
.PP
.Vb 2
\&    dev ino mode nlink uid gid rdev size 
\&    atime mtime ctime blksize blocks
.Ve
.PP
e.g.
.PP
.Vb 1
\&    [% USE File(\*(Aq/foo/bar/baz.html\*(Aq) %]
\&    
\&    [% File.mtime %]
\&    [% File.mode %]
\&    ...
.Ve
.PP
In addition, the \f(CW\*(C`user\*(C'\fR and \f(CW\*(C`group\*(C'\fR items are set to contain the user
and group names as returned by calls to \f(CW\*(C`getpwuid()\*(C'\fR and \f(CW\*(C`getgrgid()\*(C'\fR for
the file \f(CW\*(C`uid\*(C'\fR and \f(CW\*(C`gid\*(C'\fR elements, respectively.  On Win32 platforms
on which \f(CW\*(C`getpwuid()\*(C'\fR and \f(CW\*(C`getgrid()\*(C'\fR are not available, these values are
undefined.
.PP
.Vb 3
\&    [% USE File(\*(Aq/tmp/foo.html\*(Aq) %]
\&    [% File.uid %]      # e.g. 500
\&    [% File.user %]     # e.g. abw
.Ve
.PP
This user/group lookup can be disabled by setting the \f(CW\*(C`noid\*(C'\fR option.
.PP
.Vb 3
\&    [% USE File(\*(Aq/tmp/foo.html\*(Aq, noid=1) %]
\&    [% File.uid %]      # e.g. 500
\&    [% File.user %]     # nothing
.Ve
.PP
The \f(CW\*(C`isdir\*(C'\fR flag will be set if the file is a directory.
.PP
.Vb 2
\&    [% USE File(\*(Aq/tmp\*(Aq) %]
\&    [% File.isdir %]    # 1
.Ve
.PP
If the \f(CW\*(C`stat()\*(C'\fR on the file fails (e.g. file doesn't exists, bad
permission, etc) then the constructor will throw a \f(CW\*(C`File\*(C'\fR exception.
This can be caught within a \f(CW\*(C`TRY...CATCH\*(C'\fR block.
.PP
.Vb 6
\&    [% TRY %]
\&       [% USE File(\*(Aq/tmp/myfile\*(Aq) %]
\&       File exists!
\&    [% CATCH File %]
\&       File error: [% error.info %]
\&    [% END %]
.Ve
.PP
Note the capitalisation of the exception type, '\f(CW\*(C`File\*(C'\fR', to indicate an
error thrown by the \f(CW\*(C`File\*(C'\fR plugin, to distinguish it from a regular
\&\f(CW\*(C`file\*(C'\fR exception thrown by the Template Toolkit.
.PP
Note that the \f(CW\*(C`File\*(C'\fR plugin can also be referenced by the lower case
name '\f(CW\*(C`file\*(C'\fR'.  However, exceptions are always thrown of the \f(CW\*(C`File\*(C'\fR
type, regardless of the capitalisation of the plugin named used.
.PP
.Vb 2
\&    [% USE file(\*(Aqfoo.html\*(Aq) %]
\&    [% file.mtime %]
.Ve
.PP
As with any other Template Toolkit plugin, an alternate name can be 
specified for the object created.
.PP
.Vb 2
\&    [% USE foo = file(\*(Aqfoo.html\*(Aq) %]
\&    [% foo.mtime %]
.Ve
.PP
The \f(CW\*(C`nostat\*(C'\fR option can be specified to prevent the plugin constructor
from performing a \f(CW\*(C`stat()\*(C'\fR on the file specified.  In this case, the
file does not have to exist in the file system, no attempt will be made
to verify that it does, and no error will be thrown if it doesn't.
The entries for the items usually returned by \f(CW\*(C`stat()\*(C'\fR will be set 
empty.
.PP
.Vb 2
\&    [% USE file(\*(Aq/some/where/over/the/rainbow.html\*(Aq, nostat=1) 
\&    [% file.mtime %]     # nothing
.Ve
.SH "METHODS"
.IX Header "METHODS"
All \f(CW\*(C`File\*(C'\fR plugins, regardless of the \f(CW\*(C`nostat\*(C'\fR option, have set a number
of items relating to the original path specified.
.SS "path"
.IX Subsection "path"
The full, original file path specified to the constructor.
.PP
.Vb 2
\&    [% USE file(\*(Aq/foo/bar.html\*(Aq) %]
\&    [% file.path %]     # /foo/bar.html
.Ve
.SS "name"
.IX Subsection "name"
The name of the file without any leading directories.
.PP
.Vb 2
\&    [% USE file(\*(Aq/foo/bar.html\*(Aq) %]
\&    [% file.name %]     # bar.html
.Ve
.SS "dir"
.IX Subsection "dir"
The directory element of the path with the filename removed.
.PP
.Vb 2
\&    [% USE file(\*(Aq/foo/bar.html\*(Aq) %]
\&    [% file.name %]     # /foo
.Ve
.SS "ext"
.IX Subsection "ext"
The file extension, if any, appearing at the end of the path following 
a '\f(CW\*(C`.\*(C'\fR' (not included in the extension).
.PP
.Vb 2
\&    [% USE file(\*(Aq/foo/bar.html\*(Aq) %]
\&    [% file.ext %]      # html
.Ve
.SS "home"
.IX Subsection "home"
This contains a string of the form '\f(CW\*(C`../..\*(C'\fR' to represent the upward path
from a file to its root directory.
.PP
.Vb 2
\&    [% USE file(\*(Aqbar.html\*(Aq) %]
\&    [% file.home %]     # nothing
\&    
\&    [% USE file(\*(Aqfoo/bar.html\*(Aq) %]
\&    [% file.home %]     # ..
\&    
\&    [% USE file(\*(Aqfoo/bar/baz.html\*(Aq) %]
\&    [% file.home %]     # ../..
.Ve
.SS "root"
.IX Subsection "root"
The \f(CW\*(C`root\*(C'\fR item can be specified as a constructor argument, indicating
a root directory in which the named file resides.  This is otherwise
set empty.
.PP
.Vb 2
\&    [% USE file(\*(Aqfoo/bar.html\*(Aq, root=\*(Aq/tmp\*(Aq) %]
\&    [% file.root %]     # /tmp
.Ve
.SS "abs"
.IX Subsection "abs"
This returns the absolute file path by constructing a path from the 
\&\f(CW\*(C`root\*(C'\fR and \f(CW\*(C`path\*(C'\fR options.
.PP
.Vb 4
\&    [% USE file(\*(Aqfoo/bar.html\*(Aq, root=\*(Aq/tmp\*(Aq) %]
\&    [% file.path %]     # foo/bar.html
\&    [% file.root %]     # /tmp
\&    [% file.abs %]      # /tmp/foo/bar.html
.Ve
.SS "rel(path)"
.IX Subsection "rel(path)"
This returns a relative path from the current file to another path specified
as an argument.  It is constructed by appending the path to the '\f(CW\*(C`home\*(C'\fR' 
item.
.PP
.Vb 2
\&    [% USE file(\*(Aqfoo/bar/baz.html\*(Aq) %]
\&    [% file.rel(\*(Aqwiz/waz.html\*(Aq) %]      # ../../wiz/waz.html
.Ve
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.Vb 1
\&    [% USE file(\*(Aq/foo/bar/baz.html\*(Aq) %]
\&    
\&    [% file.path  %]      # /foo/bar/baz.html
\&    [% file.dir   %]      # /foo/bar
\&    [% file.name  %]      # baz.html
\&    [% file.home  %]      # ../..
\&    [% file.root  %]      # \*(Aq\*(Aq
\&    [% file.abs   %]      # /foo/bar/baz.html
\&    [% file.ext   %]      # html
\&    [% file.mtime %]      # 987654321
\&    [% file.atime %]      # 987654321
\&    [% file.uid   %]      # 500
\&    [% file.user  %]      # abw
\&
\&    [% USE file(\*(Aqfoo.html\*(Aq) %]
\&    
\&    [% file.path %]           # foo.html
\&    [% file.dir  %]       # \*(Aq\*(Aq
\&    [% file.name %]           # foo.html
\&    [% file.root %]       # \*(Aq\*(Aq
\&    [% file.home %]       # \*(Aq\*(Aq
\&    [% file.abs  %]       # foo.html
\&
\&    [% USE file(\*(Aqfoo/bar/baz.html\*(Aq) %]
\&    
\&    [% file.path %]           # foo/bar/baz.html
\&    [% file.dir  %]       # foo/bar
\&    [% file.name %]           # baz.html
\&    [% file.root %]       # \*(Aq\*(Aq
\&    [% file.home %]       # ../..
\&    [% file.abs  %]       # foo/bar/baz.html
\&
\&    [% USE file(\*(Aqfoo/bar/baz.html\*(Aq, root=\*(Aq/tmp\*(Aq) %]
\&    
\&    [% file.path %]           # foo/bar/baz.html
\&    [% file.dir  %]       # foo/bar
\&    [% file.name %]           # baz.html
\&    [% file.root %]       # /tmp
\&    [% file.home %]       # ../..
\&    [% file.abs  %]       # /tmp/foo/bar/baz.html
\&
\&    # calculate other file paths relative to this file and its root
\&    [% USE file(\*(Aqfoo/bar/baz.html\*(Aq, root => \*(Aq/tmp/tt2\*(Aq) %]
\&    
\&    [% file.path(\*(Aqbaz/qux.html\*(Aq) %]         # ../../baz/qux.html
\&    [% file.dir(\*(Aqwiz/woz.html\*(Aq)  %]     # ../../wiz/woz.html
.Ve
.SH "AUTHORS"
.IX Header "AUTHORS"
Michael Stevens wrote the original \f(CW\*(C`Directory\*(C'\fR plugin on which this is based.
Andy Wardley split it into separate \f(CW\*(C`File\*(C'\fR and \f(CW\*(C`Directory\*(C'\fR plugins, added
some extra code and documentation for \f(CW\*(C`VIEW\*(C'\fR support, and made a few other
minor tweaks.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2007 Michael Stevens, Andy Wardley.
.PP
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Template::Plugin, Template::Plugin::Directory, Template::View

Youez - 2016 - github.com/yon3zu
LinuXploit