MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / TFile

Class TFile

sourcecommon/File.h:62–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60#define WRITE_FILE_NEW GENERIC_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL
61
62class TFile
63{
64private:
65 HANDLE handle; //
66 bool Error; // ��������� �������� ����������� � ������� ?
67 bool Exceptions; // �������� ��������� ��� ������� ?
68 DWORD LastError; // GetLastError
69 DWORD bytes; // ���� ���������/�������� � ��������� ��������
70
71public:
72 __fastcall TFile(bool enableExceptions = false);
73 __fastcall TFile(char * FileName, DWORD Access, DWORD ShareMode,
74 DWORD CreationDistribution,
75 DWORD FlagsAndAttributes,
76 bool enableExceptions = false);
77 __fastcall TFile(String FileName, DWORD Access, DWORD ShareMode,
78 DWORD CreationDistribution,
79 DWORD FlagsAndAttributes,
80 bool enableExceptions = false);
81
82 __fastcall ~TFile();
83
84public:
85 bool __fastcall Open(char * FileName, DWORD Access, DWORD ShareMode,
86 DWORD CreationDistribution, DWORD FlagsAndAttributes);
87 bool __fastcall Open(String FileName, DWORD Access, DWORD ShareMode,
88 DWORD CreationDistribution, DWORD FlagsAndAttributes);
89 bool __fastcall Close(void);
90 bool __fastcall IsOpen(void);
91
92 bool __fastcall Write(BYTE * data, DWORD size);
93 bool __fastcall Read(BYTE * data, DWORD size);
94
95 bool __fastcall Flush(void);
96
97 // ���������� ��������� ��������� � �����
98 // MoveMethod (�� ���� ���������� ��������� �����):
99 // FILE_BEGIN - �� ������
100 // FILE_CURRENT - �� ������� ������� ���������
101 // FILE_END - �� �����
102 bool __fastcall SetPointer(LONG Dist, DWORD MoveMethod);
103 // ���������� ��������� ��������� � ����� ������������ ��� ������
104 bool __fastcall SetPointer(LONG Dist);
105 // �������� ��������� ��������� � �����
106 LONG __fastcall GetPointer(void);
107 // �������� ������ �����
108 DWORD __fastcall GetSize(void);
109
110 bool __fastcall SetPointer64(LONGLONG Dist, DWORD MoveMethod);
111 bool __fastcall SetPointer64(LONGLONG Dist);
112 LONGLONG __fastcall GetPointer64(void);
113 ULONGLONG __fastcall GetSize64(void);
114
115 // set pointer to file begin
116 bool __fastcall ToStart(void);
117 // set pointer to file end
118 bool __fastcall ToEnd(void);
119

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected