Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Windows/FileIO.h')
-rwxr-xr-xWindows/FileIO.h44
1 files changed, 20 insertions, 24 deletions
diff --git a/Windows/FileIO.h b/Windows/FileIO.h
index b4d8361d..18014844 100755
--- a/Windows/FileIO.h
+++ b/Windows/FileIO.h
@@ -3,6 +3,8 @@
#ifndef __WINDOWS_FILEIO_H
#define __WINDOWS_FILEIO_H
+#include "../Common/Types.h"
+
namespace NWindows {
namespace NFile {
namespace NIO {
@@ -14,9 +16,9 @@ struct CByHandleFileInfo
FILETIME LastAccessTime;
FILETIME LastWriteTime;
DWORD VolumeSerialNumber;
- UINT64 Size;
+ UInt64 Size;
DWORD NumberOfLinks;
- UINT64 FileIndex;
+ UInt64 FileIndex;
};
class CFileBase
@@ -32,19 +34,18 @@ protected:
#endif
public:
- CFileBase():
- _fileIsOpen(false){};
+ CFileBase(): _fileIsOpen(false){};
virtual ~CFileBase();
virtual bool Close();
- bool GetPosition(UINT64 &position) const;
- bool GetLength(UINT64 &length) const;
+ bool GetPosition(UInt64 &position) const;
+ bool GetLength(UInt64 &length) const;
- bool Seek(INT64 distanceToMove, DWORD moveMethod, UINT64 &newPosition) const;
- bool Seek(UINT64 position, UINT64 &newPosition);
+ bool Seek(Int64 distanceToMove, DWORD moveMethod, UInt64 &newPosition) const;
+ bool Seek(UInt64 position, UInt64 &newPosition);
bool SeekToBegin();
- bool SeekToEnd(UINT64 &newPosition);
+ bool SeekToEnd(UInt64 &newPosition);
bool GetFileInformation(CByHandleFileInfo &fileInfo) const;
};
@@ -52,16 +53,14 @@ public:
class CInFile: public CFileBase
{
public:
- bool Open(LPCTSTR fileName, DWORD shareMode,
- DWORD creationDisposition, DWORD flagsAndAttributes);
+ bool Open(LPCTSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
bool Open(LPCTSTR fileName);
#ifndef _UNICODE
- bool Open(LPCWSTR fileName, DWORD shareMode,
- DWORD creationDisposition, DWORD flagsAndAttributes);
+ bool Open(LPCWSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
bool Open(LPCWSTR fileName);
#endif
- bool ReadPart(void *data, UINT32 size, UINT32 &processedSize);
- bool Read(void *data, UINT32 size, UINT32 &processedSize);
+ bool ReadPart(void *data, UInt32 size, UInt32 &processedSize);
+ bool Read(void *data, UInt32 size, UInt32 &processedSize);
};
class COutFile: public CFileBase
@@ -69,14 +68,12 @@ class COutFile: public CFileBase
// DWORD m_CreationDisposition;
public:
// COutFile(): m_CreationDisposition(CREATE_NEW){};
- bool Open(LPCTSTR fileName, DWORD shareMode,
- DWORD creationDisposition, DWORD flagsAndAttributes);
+ bool Open(LPCTSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
bool Open(LPCTSTR fileName, DWORD creationDisposition);
bool Create(LPCTSTR fileName, bool createAlways);
#ifndef _UNICODE
- bool Open(LPCWSTR fileName, DWORD shareMode,
- DWORD creationDisposition, DWORD flagsAndAttributes);
+ bool Open(LPCWSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes);
bool Open(LPCWSTR fileName, DWORD creationDisposition);
bool Create(LPCWSTR fileName, bool createAlways);
#endif
@@ -88,13 +85,12 @@ public:
{ m_CreationDisposition = CREATE_ALWAYS; }
*/
- bool SetTime(const FILETIME *creationTime,
- const FILETIME *lastAccessTime, const FILETIME *lastWriteTime);
+ bool SetTime(const FILETIME *creationTime, const FILETIME *lastAccessTime, const FILETIME *lastWriteTime);
bool SetLastWriteTime(const FILETIME *lastWriteTime);
- bool WritePart(const void *data, UINT32 size, UINT32 &processedSize);
- bool Write(const void *data, UINT32 size, UINT32 &processedSize);
+ bool WritePart(const void *data, UInt32 size, UInt32 &processedSize);
+ bool Write(const void *data, UInt32 size, UInt32 &processedSize);
bool SetEndOfFile();
- bool SetLength(UINT64 length);
+ bool SetLength(UInt64 length);
};
}}}