PIFile: applyFileInfo
PIPeer: fixed pisd work progress ... git-svn-id: svn://db.shs.com.ru/pip@20 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -50,6 +50,8 @@ public:
|
||||
Permissions(uchar r = 0): raw(r) {}
|
||||
Permissions(bool r, bool w, bool e): raw(0) {read = w; write = w; exec = e;}
|
||||
PIString toString() const {return PIString(read ? "r" : "-") + PIString(write ? "w" : "-") + PIString(exec ? "x" : "-");}
|
||||
operator int() const {return raw;}
|
||||
Permissions & operator =(int v) {raw = v; return *this;}
|
||||
union {
|
||||
uchar raw;
|
||||
struct {
|
||||
@@ -259,6 +261,12 @@ public:
|
||||
//! Returns FileInfo of file or dir with path "path"
|
||||
static FileInfo fileInfo(const PIString & path);
|
||||
|
||||
//! Apply "info" parameters to file or dir with path "path"
|
||||
static bool applyFileInfo(const PIString & path, const FileInfo & info);
|
||||
|
||||
//! Apply "info" parameters to file or dir with path "info".path
|
||||
static bool applyFileInfo(const FileInfo & info) {return applyFileInfo(info.path, info);}
|
||||
|
||||
//! \handlers
|
||||
//! \{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user