diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 18:07:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 18:12:33 +0200 |
commit | f65de4feee506b80be0986ce28f7a2311e4fbe2c (patch) | |
tree | dc9bcdb650550e2e2e88c36c2024f895c17b9f6c /include/osl/file.hxx | |
parent | 1122d513efbb3066b4e8aefbc8dc29ce7a7e9bcf (diff) |
fdo#60338: Introduce osl_createDirectoryWithFlags
...so that utl::TempFile can pass osl_File_OpenFlag_Private and doesn't have to
resort to umask (the calls to umask around Directory::create had somewhat
erroneously been removed recently with 1d72a0262c4570631d0aa8f98e34e21fb9d6ae42
"Related fdo#60338: Create missing temp file dir with user's original umask,"
mistaking this for creation of intermediate directories in the hierarchy).
On Windows, the flags argument to osl_createDirectoryWithFlags is ignored
completely for now.
Change-Id: Iac56a5049d579be729a3f338aa62105123edb6cb
Diffstat (limited to 'include/osl/file.hxx')
-rw-r--r-- | include/osl/file.hxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/osl/file.hxx b/include/osl/file.hxx index 1e600e78ca80..8f7f3b4a9690 100644 --- a/include/osl/file.hxx +++ b/include/osl/file.hxx @@ -1849,6 +1849,10 @@ public: @param ustrDirectoryURL [in] Full qualified URL of the directory to create. + @param flags [in] + Optional flags, see osl_createDirectoryWithFlags for details. This + defaulted parameter is new since LibreOffice 4.3. + @return E_None on success E_INVAL the format of the parameters was not valid @@ -1871,9 +1875,12 @@ public: @see remove() */ - inline static RC create( const ::rtl::OUString& ustrDirectoryURL ) + inline static RC create( + const ::rtl::OUString& ustrDirectoryURL, + sal_Int32 flags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write ) { - return static_cast< RC >( osl_createDirectory( ustrDirectoryURL.pData ) ); + return static_cast< RC >( + osl_createDirectoryWithFlags( ustrDirectoryURL.pData, flags ) ); } /** Remove an empty directory. |