|
|
| |
App::PFM::File(3) |
User Contributed Perl Documentation |
App::PFM::File(3) |
PFM File class, containing the bookkeeping for each file in the directory.
- _init(hashref { parent => string $parent_dir, entry
=> string $filename, white => char
$iswhite, mark => char $marked_flag }
)
- Initializes new instances. Called from the constructor. If entry is
defined, the method stat_entry() is called automatically.
- _decidecolor()
- Decides which color should be used on a particular file.
- parent()
- Getter for the path of the containing directory according to the
bookkeeping of this file.
- makefile(string $path)
- Creates a App::PFM::File object for the given path.
This is a factory method; it should be called as follows:
$file = App::PFM::File->makefile('/home/ruittenb/.profile');
- mode2str(int $st_mode)
- Converts a numeric st_mode field (file type/permission bits) to a
symbolic one (e.g. "drwxr-x---").
Uses App::PFM::OS::*::ifmt2str() to determine the inode type. Uses
App::PFM::OS::*::mode2str() to determine the symbolic
representation of permissions.
- stamp2str(int $timestamp)
- Formats a timestamp for printing.
- dummy_entry(string $entry)
- Initializes the current file information as a dummy entry.
- stat_entry(string $entry, char $iswhite,
char $marked_flag)
- Initializes the current file information by performing a stat() on
it.
The iswhite argument indicates if the directory already
has an idea if this file is a whiteout. Allowed values: 'w', '?',
''.
The marked_flag argument is used to have the caller
specify whether the 'mark' field of the file info should be cleared
(when reading a new directory) or kept intact (when re-statting).
- filetypeflag()
- Returns the correct flag for this file type.
- format()
- Formats the fields according to the current screen size.
- apply(coderef $do_this, string
$special_mode, array @args)
- Applies the supplied function to the current file. The function will be
called as "$do_this->($self, @args)"
where self is the current File object.
The current file will be temporarily unregistered from the
current directory for the duration of do_this().
If special_mode does not equal 'norestat', the file is
re-stat() after executing do_this().
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |