From 27960861a66d13a3f0bb3ff8503bc9fdb53745da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Feb 2020 18:54:43 +0200 Subject: 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 --- include/tools/stream.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/tools/stream.hxx') 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 : is_typed_flags {}; + template<> struct typed_flags : is_typed_flags {}; } #define STREAM_SEEK_TO_BEGIN 0L -- cgit