Files
easy7zip/CPP/7zip/UI/FileManager/FSDrives.h
Igor Pavlov f08f4dcc3c 9.34
2016-05-28 00:16:51 +01:00

60 lines
1.2 KiB
C++

// FSDrives.h
#ifndef __FS_DRIVES_H
#define __FS_DRIVES_H
#include "../../../Common/MyCom.h"
#include "../../../Common/MyString.h"
#include "IFolder.h"
struct CDriveInfo
{
FString Name;
FString FullSystemName;
UInt64 DriveSize;
UInt64 FreeSpace;
UInt64 ClusterSize;
// UString Type;
UString VolumeName;
UString FileSystemName;
UINT DriveType;
bool KnownSize;
bool KnownSizes;
bool IsPhysicalDrive;
FString GetDeviceFileIoName() const;
CDriveInfo(): KnownSize(false), KnownSizes(false), IsPhysicalDrive(false) {}
};
class CFSDrives:
public IFolderFolder,
public IFolderOperations,
public IFolderGetSystemIconIndex,
public CMyUnknownImp
{
CObjectVector<CDriveInfo> _drives;
bool _volumeMode;
bool _longMode;
HRESULT BindToFolderSpec(CFSTR name, IFolderFolder **resultFolder);
const wchar_t *GetExt(unsigned index) const;
HRESULT GetFileSize(unsigned index, UInt64 &fileSize) const;
public:
MY_UNKNOWN_IMP2(IFolderGetSystemIconIndex, IFolderOperations)
INTERFACE_FolderFolder(;)
INTERFACE_FolderOperations(;)
STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex);
void Init(bool volMode = false, bool longMode = false)
{
_volumeMode = volMode;
_longMode = longMode;
}
};
#endif