kmailMaildirFormat Class Reference

Reads KMail Maildir format. More...

Inheritance diagram for kmailMaildirFormat:
Inheritance graph
[legend]
Collaboration diagram for kmailMaildirFormat:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 kmailMaildirFormat (ref< context > ctx)
const string getName () const
void createFolder (const folder::path &path)
void destroyFolder (const folder::path &path)
void renameFolder (const folder::path &oldPath, const folder::path &newPath)
bool folderExists (const folder::path &path) const
bool folderHasSubfolders (const folder::path &path) const
const utility::file::path folderPathToFileSystemPath (const folder::path &path, const DirectoryType type) const
const std::vector< folder::pathlistFolders (const folder::path &root, const bool recursive) const

Protected Member Functions

bool supports () const
void listFoldersImpl (std::vector< folder::path > &list, const folder::path &root, const bool recursive) const

Static Protected Member Functions

static bool isSubfolderDirectory (const utility::file &file)

Detailed Description

Reads KMail Maildir format.


Constructor & Destructor Documentation

kmailMaildirFormat ( ref< context ctx  ) 

Member Function Documentation

void createFolder ( const folder::path path  )  [virtual]

Create the specified folder.

Parameters:
path virtual path of the folder
Exceptions:
filesystem_exception,invalid_folder_name 

Implements maildirFormat.

void destroyFolder ( const folder::path path  )  [virtual]

Destroy the specified folder.

Parameters:
path virtual path of the folder
Exceptions:
filesystem_exception 

Implements maildirFormat.

bool folderExists ( const folder::path path  )  const [virtual]

Test whether the specified folder exists.

Parameters:
path virtual path of the folder
Returns:
true if the folder exists, false otherwise

Implements maildirFormat.

bool folderHasSubfolders ( const folder::path path  )  const [virtual]

Test whether the specified folder has subfolders.

Parameters:
path virtual path of the folder
Returns:
true if the folder has at least one subfolder, false otherwise

Implements maildirFormat.

const utility::file::path folderPathToFileSystemPath ( const folder::path path,
const DirectoryType  type 
) const [virtual]

Returns the directory which represents the specified folder on the file system.

Parameters:
path virtual path of the folder
type type of directory to return
Returns:
corresponding directory on the file system

Implements maildirFormat.

const string getName (  )  const [virtual]

Return the name of this Maildir format.

Returns:
format name

Implements maildirFormat.

References kmailMaildirFormat::kmailMaildirFormat().

bool isSubfolderDirectory ( const utility::file file  )  [static, protected]

Test whether the specified file system directory corresponds to a maildir subfolder.

The name of the directory should not start with '.' to be listed as a subfolder.

Parameters:
file reference to a file system directory
Returns:
true if the specified directory is a maildir subfolder, false otherwise
const std::vector< folder::path > listFolders ( const folder::path root,
const bool  recursive 
) const [virtual]

List subfolders in the specified folder.

Parameters:
root root folder in which to start the search
recursive if set to true, all the descendant are returned; if set to false, only direct children are returned.
Returns:
list of subfolders

Implements maildirFormat.

void listFoldersImpl ( std::vector< folder::path > &  list,
const folder::path root,
const bool  recursive 
) const [protected]

Recursive implementation of listFolders().

void renameFolder ( const folder::path oldPath,
const folder::path newPath 
) [virtual]

Rename the specified folder.

Parameters:
oldPath old virtual path of the folder
newPath new virtual path of the folder
Exceptions:
filesystem_exception 

Implements maildirFormat.

bool supports (  )  const [protected, virtual]

Quick checks whether this implementation can read the Maildir format in the specified directory.

Returns:
true if the implementation supports the specified Maildir, or false otherwise

Implements maildirFormat.


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2