diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-04-06 13:33:38 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-04-13 11:32:09 +0300 |
commit | 96ade47c182bf37a2efca2aa62922e54e5ff1660 (patch) | |
tree | 93ceee6c6f8984f563f3dfe83e56f98b66b40f3a /src/libs/7zip/win/CPP/Windows/FileDir.h | |
parent | 2d5f0ffaf1278516bbd74e3b60f9849f4c51cffa (diff) |
Move LZMA SDK to 3rdparty subdirectory
Also add attribution document.
Task-number: QTIFW-2336
Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/libs/7zip/win/CPP/Windows/FileDir.h')
-rw-r--r-- | src/libs/7zip/win/CPP/Windows/FileDir.h | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/src/libs/7zip/win/CPP/Windows/FileDir.h b/src/libs/7zip/win/CPP/Windows/FileDir.h deleted file mode 100644 index 02d3e5a57..000000000 --- a/src/libs/7zip/win/CPP/Windows/FileDir.h +++ /dev/null @@ -1,97 +0,0 @@ -// Windows/FileDir.h - -#ifndef __WINDOWS_FILE_DIR_H -#define __WINDOWS_FILE_DIR_H - -#include "../Common/MyString.h" - -#include "FileIO.h" - -namespace NWindows { -namespace NFile { -namespace NDir { - -bool GetWindowsDir(FString &path); -bool GetSystemDir(FString &path); - -bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime); -bool SetFileAttrib(CFSTR path, DWORD attrib); -bool MyMoveFile(CFSTR existFileName, CFSTR newFileName); - -#ifndef UNDER_CE -bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName); -#endif - -bool RemoveDir(CFSTR path); -bool CreateDir(CFSTR path); -bool CreateComplexDir(CFSTR path); -bool DeleteFileAlways(CFSTR name); -bool RemoveDirWithSubItems(const FString &path); - -bool MyGetFullPathName(CFSTR path, FString &resFullPath); -bool GetFullPathAndSplit(CFSTR path, FString &resDirPrefix, FString &resFileName); -bool GetOnlyDirPrefix(CFSTR path, FString &resDirPrefix); - -#ifndef UNDER_CE - -bool SetCurrentDir(CFSTR path); -bool GetCurrentDir(FString &resultPath); - -#endif - -bool MyGetTempPath(FString &resultPath); - -class CTempFile -{ - bool _mustBeDeleted; - FString _path; - void DisableDeleting() { _mustBeDeleted = false; } -public: - CTempFile(): _mustBeDeleted(false) {} - ~CTempFile() { Remove(); } - const FString &GetPath() const { return _path; } - bool Create(CFSTR pathPrefix, NIO::COutFile *outFile); // pathPrefix is not folder prefix - bool CreateRandomInTempFolder(CFSTR namePrefix, NIO::COutFile *outFile); - bool Remove(); - bool MoveTo(CFSTR name, bool deleteDestBefore); -}; - -class CTempDir -{ - bool _mustBeDeleted; - FString _path; -public: - CTempDir(): _mustBeDeleted(false) {} - ~CTempDir() { Remove(); } - const FString &GetPath() const { return _path; } - void DisableDeleting() { _mustBeDeleted = false; } - bool Create(CFSTR namePrefix) ; - bool Remove(); -}; - -#if !defined(UNDER_CE) -class CCurrentDirRestorer -{ - FString _path; -public: - bool NeedRestore; - - CCurrentDirRestorer(): NeedRestore(true) - { - GetCurrentDir(_path); - } - ~CCurrentDirRestorer() - { - if (!NeedRestore) - return; - FString s; - if (GetCurrentDir(s)) - if (s != _path) - SetCurrentDir(_path); - } -}; -#endif - -}}} - -#endif |