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
80 lines
1.6 KiB
C++
Executable File
80 lines
1.6 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 headerfilecmslucontentcp
|
|
#define headerfilecmslucontentcp
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
|
|
|
|
class Cp : public FunctionBase
|
|
{
|
|
public:
|
|
|
|
Cp();
|
|
bool HasAccess();
|
|
void MakePost();
|
|
|
|
private:
|
|
|
|
Item temp;
|
|
DbItemQuery iq;
|
|
bool remove_defaults;
|
|
bool preserve_attr;
|
|
bool follow_symlinks;
|
|
long new_user;
|
|
long new_group;
|
|
|
|
// destination dir (will not be empty)
|
|
std::vector<Item*> dir_tab, symlink_dir_tab;
|
|
|
|
// for testing loops in directories (between symlinks)
|
|
std::vector<long> loop_checker;
|
|
|
|
// 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;
|
|
|
|
std::vector<Item> item_tab;
|
|
|
|
bool WasThisDir(const Item & dir);
|
|
bool CheckAccessFrom();
|
|
bool CheckAccessTo();
|
|
bool ParseDir();
|
|
bool CopyStaticFile(const std::wstring & from, const std::wstring & to);
|
|
void CopyStaticFile(Item & item);
|
|
void SetNewAttributes(Item & item);
|
|
void CopyFile(Item & item, long dst_dir_id);
|
|
void CopyFileOrSymlink(Item & item, long dst_dir_id);
|
|
void Prepare();
|
|
void CopyFilesInDir(const Item & dir, long dst_dir_id);
|
|
void CopyDirContentTree(const Item & item, long dst_dir_id);
|
|
long CopyDirTree(const Item & item, long dst_dir_id);
|
|
bool IsTheSameFile(const Item & item);
|
|
void Clear();
|
|
void PostCopyFile(Item & item, bool redirect = true);
|
|
void PostCopyDirContent(const Item & dir, bool redirect = true);
|
|
void PostCopyDir(const Item & dir, bool redirect = true);
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
#endif
|