diff options
author | vng <viktor.govako@gmail.com> | 2011-09-08 16:12:36 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:23:25 +0300 |
commit | bd75e193c049cd8c73289765ff4d28d5da357492 (patch) | |
tree | 8d9a0dddb290504c02084147b064f499bdf56d7d /coding/file_writer.hpp | |
parent | 0c3352b86446d6a2d148029dd6c7351c712d6555 (diff) |
Fix using of FilesContainerR, FilesContainerW.
Note! FilesContainerW::GetWriter can reallocate file on disk.
Diffstat (limited to 'coding/file_writer.hpp')
-rw-r--r-- | coding/file_writer.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/coding/file_writer.hpp b/coding/file_writer.hpp index b5ef6a1c18..a468caa049 100644 --- a/coding/file_writer.hpp +++ b/coding/file_writer.hpp @@ -27,7 +27,8 @@ public: /// Added for use in FilesContainerW interface. FileWriter(FileWriter const & rhs); - explicit FileWriter(string const & fileName, Op operation = OP_WRITE_TRUNCATE); + explicit FileWriter(string const & fileName, + Op operation = OP_WRITE_TRUNCATE, bool bTruncOnClose = false); ~FileWriter(); void Seek(int64_t pos); @@ -36,7 +37,6 @@ public: uint64_t Size() const; void Flush(); - void Truncate(uint64_t sz); static void DeleteFileX(string const & fName); @@ -45,4 +45,5 @@ public: private: typedef my::FileData fdata_t; scoped_ptr<fdata_t> m_pFileData; + bool m_bTruncOnClose; }; |