See METHODS in Mail::Reporter
Option | Defined in | Default |
---|---|---|
deleted | <false> | |
description | User::Identity::Item | undef |
folder_type |
| |
inferiors | 1 | |
location |
| |
log | Mail::Reporter |
|
manager | <from parent> | |
marked |
| |
name | User::Identity::Item | <required> |
only_subs | <foldertype and name dependent> | |
parent | User::Identity::Item |
|
subf_type | <same as parent> | |
trace | Mail::Reporter |
|
Returns the type of this folder.
Returns the name of the folder, from the toplevel until this one, with
the DELIMETER string between each level. DELIMETER default to a forward
slash (a /
).
Inferiors
are subfolders
. When this flag is set, it is permitted
to create subfolders.
Returns the directory or filename of the folder. If this is not pre-defined, it is computed based on the knowledge about the folder type. Be sure to set the location of the toplevel folder to the folderdir of the user to get this to work.
Returns the manager (usually a Mail::Box::Manage::User which owns the folders. May be undefined, by default from parent.
When something special has happened with the folder, this flag can
be set (or cleared). The undef
status is an "unknown". In the
IMAP4 protocol, 0
will result in a \Unmarked
, a 1
results
in a \Marked
, and undef
in nothing.
Than this folder be opened (without trying) or not? The default depends on the folder type, and whether this is the toplevel folder or not. See Mail::Box::topFolderWithMessages()
Run up the tree to find the highest level folder.
Add a new folder into the administration. With DATA, a new object will be instantiated first. The identity is returned on success.
The inferiors() flag prohibits the creation of subfolders to this folder.
Returns the subfolder's object with NAME or undef
if it does not
exist. When multiple NAMEs are added, those super folders are traverst
first. Without any NAME, the current object is returned
my $a = $user->folders->folder('b', 'a'); my $name = "a:b:c"; my $delim = ":"; my $f = $user->folders->folder(split $delim, $name);
For each of the subfolders found below this point call CODE. This current folder is called first. Be warned that you may find identities with the Mail::Box::Identity subroutine deleted flag on.
Open the folder which is described by this identity. Returned is some Mail::Box. The options are passed to Mail::Box::Manager::open().
Remove the folder (plus subfolders) with the NAME. Without NAME, this
Mail::Box::Identity
itself is removed.
The removed structure is returned, which is undef
if not
found. This is only an administrative remove, you still need a
Mail::Box::Manager::delete().
The Mail::Box::Identity folder administration structure requires a top directory. That top is registered somewhere (for instance by a Mail::Box::Manage::User). If you need to remove the top, you have to look for a method of that object.
Move the folder to a different super-FOLDER, under a NEW SUBfolder NAME.
my $top = $user->topfolder; my $new = $top->folder('xyz') or die; my $f = $top->folder('abc', 'def')->rename($new, '123'); print $f->name; # 123 print $f->fullname; # =/xyz/123
Convenience method: returns the names of the collected subfolders.
Returns the subfolders or undef
if there are none. This
information is lazy evaluated and cached. In LIST context, the folder
objects are returned (Mail::Box::Identity objects), in SCALAR context
the collection, the Mail::Box::Collection.