mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 01:09:56 -06:00
15.05
This commit is contained in:
committed by
Kornel Lesiński
parent
0713a3ab80
commit
54490d51d5
@@ -11,6 +11,38 @@
|
||||
|
||||
#include "../../Archive/IArchive.h"
|
||||
|
||||
struct CDirItemsStat
|
||||
{
|
||||
UInt64 NumDirs;
|
||||
UInt64 NumFiles;
|
||||
UInt64 NumAltStreams;
|
||||
UInt64 FilesSize;
|
||||
UInt64 AltStreamsSize;
|
||||
|
||||
UInt64 NumErrors;
|
||||
// UInt64 GetTotalItems() const { return NumDirs + NumFiles + NumAltStreams; }
|
||||
|
||||
UInt64 GetTotalBytes() const { return FilesSize + AltStreamsSize; }
|
||||
|
||||
CDirItemsStat():
|
||||
NumDirs(0),
|
||||
NumFiles(0),
|
||||
NumAltStreams(0),
|
||||
FilesSize(0),
|
||||
AltStreamsSize(0),
|
||||
NumErrors(0)
|
||||
{}
|
||||
};
|
||||
|
||||
#define INTERFACE_IDirItemsCallback(x) \
|
||||
virtual HRESULT ScanError(const FString &path, DWORD systemError) x; \
|
||||
virtual HRESULT ScanProgress(const CDirItemsStat &st, const FString &path, bool isDir) x; \
|
||||
|
||||
struct IDirItemsCallback
|
||||
{
|
||||
INTERFACE_IDirItemsCallback(=0)
|
||||
};
|
||||
|
||||
struct CDirItem
|
||||
{
|
||||
UInt64 Size;
|
||||
@@ -46,7 +78,7 @@ class CDirItems
|
||||
|
||||
UString GetPrefixesPath(const CIntVector &parents, int index, const UString &name) const;
|
||||
|
||||
void EnumerateDir(int phyParent, int logParent, const FString &phyPrefix);
|
||||
HRESULT EnumerateDir(int phyParent, int logParent, const FString &phyPrefix);
|
||||
|
||||
public:
|
||||
CObjectVector<CDirItem> Items;
|
||||
@@ -54,26 +86,14 @@ public:
|
||||
bool SymLinks;
|
||||
|
||||
bool ScanAltStreams;
|
||||
FStringVector ErrorPaths;
|
||||
CRecordVector<DWORD> ErrorCodes;
|
||||
UInt64 TotalSize;
|
||||
|
||||
|
||||
CDirItemsStat Stat;
|
||||
|
||||
#ifndef UNDER_CE
|
||||
void SetLinkInfo(CDirItem &dirItem, const NWindows::NFile::NFind::CFileInfo &fi,
|
||||
HRESULT SetLinkInfo(CDirItem &dirItem, const NWindows::NFile::NFind::CFileInfo &fi,
|
||||
const FString &phyPrefix);
|
||||
#endif
|
||||
|
||||
void AddError(const FString &path, DWORD errorCode)
|
||||
{
|
||||
ErrorCodes.Add(errorCode);
|
||||
ErrorPaths.Add(path);
|
||||
}
|
||||
|
||||
void AddError(const FString &path)
|
||||
{
|
||||
AddError(path, ::GetLastError());
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||
|
||||
@@ -82,19 +102,30 @@ public:
|
||||
bool _saclEnabled;
|
||||
bool ReadSecure;
|
||||
|
||||
void AddSecurityItem(const FString &path, int &secureIndex);
|
||||
HRESULT AddSecurityItem(const FString &path, int &secureIndex);
|
||||
|
||||
#endif
|
||||
|
||||
IDirItemsCallback *Callback;
|
||||
|
||||
CDirItems();
|
||||
|
||||
int GetNumFolders() const { return Prefixes.Size(); }
|
||||
UString GetPhyPath(unsigned index) const;
|
||||
void AddDirFileInfo(int phyParent, int logParent, int secureIndex,
|
||||
const NWindows::NFile::NFind::CFileInfo &fi);
|
||||
|
||||
HRESULT AddError(const FString &path, DWORD errorCode);
|
||||
HRESULT AddError(const FString &path);
|
||||
|
||||
HRESULT ScanProgress(const FString &path);
|
||||
|
||||
// unsigned GetNumFolders() const { return Prefixes.Size(); }
|
||||
FString GetPhyPath(unsigned index) const;
|
||||
UString GetLogPath(unsigned index) const;
|
||||
|
||||
unsigned AddPrefix(int phyParent, int logParent, const UString &prefix);
|
||||
void DeleteLastPrefix();
|
||||
void EnumerateItems2(
|
||||
|
||||
HRESULT EnumerateItems2(
|
||||
const FString &phyPrefix,
|
||||
const UString &logPrefix,
|
||||
const FStringVector &filePaths,
|
||||
|
||||
Reference in New Issue
Block a user