Files
winix/functions/mv.h
Tomasz Sowa 8154c403d8 we can create links (hard links, symbolic links) now
added winix functions: ln

winix function 'default' can be used without redirecting now

added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles
now tickets are combined with files
added winix functions: showtickets

fixed mountpoints:
when the default root mount was created its parameter table was empty
and it caused accessing to a non-existing objects

fixed logger:
modifiers (log1, log2, log3) were incorrectly treated
added modifier: log4 (debug info)

now we are moving threads to a new plugin 'thread'
created directory: plugins/thread
(not finished yet)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-05 21:24:11 +00:00

77 lines
1.3 KiB
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslucontentmv
#define headerfilecmslucontentmv
#include "functionbase.h"
namespace Fun
{
class Mv : public FunctionBase
{
public:
Mv();
bool HasAccess();
void MakePost();
private:
// destination dir
std::vector<Item*> dir_tab;
// destination file (if exists)
std::wstring file;
// for copying static files
std::wstring new_path, new_path_thumb;
std::wstring old_path, old_path_thumb;
// for static files
std::vector<Item> static_item_tab;
DbItemQuery static_iq;
// for moving content of a directory
DbItemQuery content_dir_iq;
std::vector<Item> item_tab;
// for logging
std::wstring old_url;
bool CheckAccessFromToDir();
bool CheckAccessFrom();
bool CheckAccessTo();
bool ParseDir();
bool MoveStaticFile(const std::wstring & from, const std::wstring & to);
void MoveStaticFile(Item & item);
void MoveFileOrSymlink(Item & item);
void MoveDirContent(const Item & dir);
void Prepare();
void Clear();
void MoveStaticFilesTree(const Item & dir);
void MoveDir(Item & dir);
bool IsTheSameFile(const Item & item);
void PostMoveFile();
void PostMoveDirContent();
void PostMoveDir();
};
} // namespace
#endif