git-svn-id: svn://db.shs.com.ru/pip@322 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-03-27 08:49:49 +00:00
parent 68892e6c76
commit 922f30e39e
13 changed files with 32 additions and 29 deletions

View File

@@ -86,7 +86,11 @@ public:
//! Constructs a file with path "path" and open mode "mode"
explicit PIFile(const PIString & path, DeviceMode mode = ReadWrite);
PIFile(const PIFile & other);
//! Open temporary file with open mode "mode"
bool openTemporary(PIIODevice::DeviceMode mode = PIIODevice::ReadWrite) {return open(PIString(tmpnam(0)), mode);}
// PIFile(const PIFile & other);
~PIFile() {closeDevice();}
@@ -176,7 +180,7 @@ public:
//! Write to file binary content of "v"
PIFile & writeBinary(const double v) {write(&v, sizeof(v)); return *this;}
PIFile & operator =(const PIFile & f) {PIIODevice::setPath(f.path()); mode_ = f.mode_; return *this;}
//PIFile & operator =(const PIFile & f) {PIIODevice::setPath(f.path()); mode_ = f.mode_; return *this;}
//! Write to file text representation of "v"
PIFile & operator <<(const char v) {if (canWrite() && fd != 0) write(&v, 1); return *this;}
@@ -244,9 +248,6 @@ public:
//!
static void setDefaultCharset(const char * c);
//! Returns opened temporary file with open mode "mode"
static PIFile openTemporary(PIIODevice::DeviceMode mode = PIIODevice::ReadWrite) {return PIFile(PIString(tmpnam(0)), mode);}
//! Returns if file with path "path" does exists
static bool isExists(const PIString & path);