61 lines
940 B
C++
Executable File
61 lines
940 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucontentrm
|
|
#define headerfilecmslucontentrm
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
|
|
class Rm : public FunctionBase
|
|
{
|
|
public:
|
|
|
|
Rm();
|
|
bool HasAccess();
|
|
void MakePost();
|
|
|
|
private:
|
|
|
|
// for static files
|
|
DbItemQuery static_iq;
|
|
std::vector<Item> static_item_tab;
|
|
std::wstring path;
|
|
|
|
// for directory content
|
|
DbItemQuery content_dir_iq;
|
|
std::vector<Item> item_tab;
|
|
|
|
// for logging
|
|
std::wstring old_url;
|
|
|
|
bool HasAccess(const Item & item);
|
|
void Prepare();
|
|
void Clear();
|
|
void RemoveFileOrSymlink(Item & item);
|
|
void RemoveDir(const Item & dir);
|
|
bool RemoveStaticFile(const std::wstring & path);
|
|
void RemoveStaticFile(Item & item);
|
|
void RemoveDirTree(long dir_id);
|
|
void RemoveDirContent();
|
|
void RemoveDir();
|
|
void RemoveFile();
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
#endif
|