aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/maildir/maildirUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/maildir/maildirUtils.cpp')
-rw-r--r--src/net/maildir/maildirUtils.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/net/maildir/maildirUtils.cpp b/src/net/maildir/maildirUtils.cpp
index f1f2300c..04d8f680 100644
--- a/src/net/maildir/maildirUtils.cpp
+++ b/src/net/maildir/maildirUtils.cpp
@@ -30,67 +30,6 @@ namespace net {
namespace maildir {
-const vmime::word maildirUtils::TMP_DIR("tmp", vmime::charset(vmime::charsets::US_ASCII)); // ensure reliable delivery (not to be listed)
-const vmime::word maildirUtils::CUR_DIR("cur", vmime::charset(vmime::charsets::US_ASCII)); // no longer new messages
-const vmime::word maildirUtils::NEW_DIR("new", vmime::charset(vmime::charsets::US_ASCII)); // unread messages
-
-
-const utility::file::path maildirUtils::getFolderFSPath
- (ref <const maildirStore> store, const utility::path& folderPath,
- const FolderFSPathMode mode)
-{
- // Root path
- utility::file::path path(store->getFileSystemPath());
-
- const int count = (mode == FOLDER_PATH_CONTAINER
- ? folderPath.getSize() : folderPath.getSize() - 1);
-
- // Parent folders
- for (int i = 0 ; i < count ; ++i)
- {
- utility::file::path::component comp(folderPath[i]);
-
- // TODO: may not work with all encodings...
- comp.setBuffer("." + comp.getBuffer() + ".directory");
-
- path /= comp;
- }
-
- // Last component
- if (folderPath.getSize() != 0 &&
- mode != FOLDER_PATH_CONTAINER)
- {
- path /= folderPath.getLastComponent();
-
- switch (mode)
- {
- case FOLDER_PATH_ROOT: break; // Nothing to do
- case FOLDER_PATH_NEW: path /= NEW_DIR; break;
- case FOLDER_PATH_CUR: path /= CUR_DIR; break;
- case FOLDER_PATH_TMP: path /= TMP_DIR; break;
- case FOLDER_PATH_CONTAINER: break; // Can't happen...
- }
- }
-
- return (path);
-}
-
-
-const bool maildirUtils::isSubfolderDirectory(const utility::file& file)
-{
- // A directory which name does not start with '.'
- // is listed as a sub-folder...
- if (file.isDirectory() &&
- file.getFullPath().getLastComponent().getBuffer().length() >= 1 &&
- file.getFullPath().getLastComponent().getBuffer()[0] != '.')
- {
- return (true);
- }
-
- return (false);
-}
-
-
const bool maildirUtils::isMessageFile(const utility::file& file)
{
// Ignore files which name begins with '.'