• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/CPANInternal-159.1/Template-Toolkit-2.25/lib/Template/Plugin/

Lines Matching defs:File

3 # Template::Plugin::File
11 # into separate File and Directory plugins, with some additional
22 package Template::Plugin::File;
27 use File::Spec;
28 use File::Basename;
40 # Create a new File object. Takes the pathname of the file as
55 if (File::Spec->file_name_is_absolute($path)) {
73 my @fields = File::Spec->splitdir($dir);
76 $abs = File::Spec->catfile($root ? $root : (), $path);
141 die (Template::Exception->new('File', $error));
150 Template::Plugin::File - Plugin providing information about files
154 [% USE File(filepath) %]
155 [% File.path %] # full path
156 [% File.name %] # filename
157 [% File.dir %] # directory
168 [% USE File('foo.html') %]
169 [% USE File('foo/bar/baz.html') %]
170 [% USE File('/foo/bar/baz.html') %]
184 [% USE File('/foo/bar/baz.html') %]
186 [% File.mtime %]
187 [% File.mode %]
196 [% USE File('/tmp/foo.html') %]
197 [% File.uid %] # e.g. 500
198 [% File.user %] # e.g. abw
202 [% USE File('/tmp/foo.html', noid=1) %]
203 [% File.uid %] # e.g. 500
204 [% File.user %] # nothing
208 [% USE File('/tmp') %]
209 [% File.isdir %] # 1
212 permission, etc) then the constructor will throw a C<File> exception.
216 [% USE File('/tmp/myfile') %]
217 File exists!
218 [% CATCH File %]
219 File error: [% error.info %]
222 Note the capitalisation of the exception type, 'C<File>', to indicate an
223 error thrown by the C<File> plugin, to distinguish it from a regular
226 Note that the C<File> plugin can also be referenced by the lower case
227 name 'C<file>'. However, exceptions are always thrown of the C<File>
251 All C<File> plugins, regardless of the C<nostat> option, have set a number
377 Andy Wardley split it into separate C<File> and C<Directory> plugins, added