diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-02-18 18:54:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-19 09:14:31 +0100 |
commit | 27960861a66d13a3f0bb3ff8503bc9fdb53745da (patch) | |
tree | 3c8a44a66de75c2756dcea7a36835d4bbd0bd43e /include/tools/stream.hxx | |
parent | fcc30680ee7ac7d2bf9ec4ccdae7256b61ad7102 (diff) |
use FILE_ATTRIBUTE_TEMPORARY on Windows for temp files
which acts as a hint to the OS that these files do not
need persistent storage.
If there is sufficient system RAM, these files will never
even hit disk.
Change-Id: I25b83aad67fda58ec39cead8bd1eb038892d3cde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88124
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools/stream.hxx')
-rw-r--r-- | include/tools/stream.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 0f17c37c4958..2e8fbc6771b5 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -48,6 +48,7 @@ enum class StreamMode { NOCREATE = 0x0004, ///< 1 == Don't create file TRUNC = 0x0008, ///< Truncate _existing_ file to zero length COPY_ON_SYMLINK = 0x0010, ///< copy-on-write for symlinks (Unix) + TEMPORARY = 0x0020, ///< temporary file attribute (Windows) // sharing options SHARE_DENYNONE = 0x0100, SHARE_DENYREAD = 0x0200, // overrides denynone @@ -61,7 +62,7 @@ enum class StreamMode { }; namespace o3tl { - template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x0f1f> {}; + template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x0f3f> {}; } #define STREAM_SEEK_TO_BEGIN 0L |