Skip to content

Commit 93438ee

Browse files
authored
Update System.IO.File declaration (#2823)
***NO_CI***
1 parent a23310b commit 93438ee

File tree

2 files changed

+45
-35
lines changed

2 files changed

+45
-35
lines changed

src/System.IO.FileSystem/nf_sys_io_filesystem.cpp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ static const CLR_RT_MethodHandler method_lookup[] =
7474
NULL,
7575
NULL,
7676
NULL,
77-
Library_nf_sys_io_filesystem_System_IO_File::ExistsNative___STATIC__BOOLEAN__STRING__STRING,
78-
Library_nf_sys_io_filesystem_System_IO_File::MoveNative___STATIC__VOID__STRING__STRING,
79-
Library_nf_sys_io_filesystem_System_IO_File::DeleteNative___STATIC__VOID__STRING,
80-
Library_nf_sys_io_filesystem_System_IO_File::GetAttributesNative___STATIC__U1__STRING,
81-
Library_nf_sys_io_filesystem_System_IO_File::SetAttributesNative___STATIC__VOID__STRING__U1,
82-
Library_nf_sys_io_filesystem_System_IO_File::GetLastWriteTimeNative___STATIC__SystemDateTime__STRING,
8377
NULL,
8478
NULL,
8579
NULL,
@@ -92,6 +86,10 @@ static const CLR_RT_MethodHandler method_lookup[] =
9286
NULL,
9387
NULL,
9488
NULL,
89+
Library_nf_sys_io_filesystem_System_IO_FileStream::OpenFileNative___VOID__STRING__STRING__I4,
90+
Library_nf_sys_io_filesystem_System_IO_FileStream::ReadNative___I4__STRING__STRING__I8__SZARRAY_U1__I4,
91+
Library_nf_sys_io_filesystem_System_IO_FileStream::WriteNative___VOID__STRING__STRING__I8__SZARRAY_U1__I4,
92+
Library_nf_sys_io_filesystem_System_IO_FileStream::GetLengthNative___I8__STRING__STRING,
9593
NULL,
9694
NULL,
9795
NULL,
@@ -101,10 +99,20 @@ static const CLR_RT_MethodHandler method_lookup[] =
10199
NULL,
102100
NULL,
103101
NULL,
104-
Library_nf_sys_io_filesystem_System_IO_FileStream::OpenFileNative___VOID__STRING__STRING__I4,
105-
Library_nf_sys_io_filesystem_System_IO_FileStream::ReadNative___I4__STRING__STRING__I8__SZARRAY_U1__I4,
106-
Library_nf_sys_io_filesystem_System_IO_FileStream::WriteNative___VOID__STRING__STRING__I8__SZARRAY_U1__I4,
107-
Library_nf_sys_io_filesystem_System_IO_FileStream::GetLengthNative___I8__STRING__STRING,
102+
NULL,
103+
NULL,
104+
NULL,
105+
NULL,
106+
NULL,
107+
NULL,
108+
NULL,
109+
Library_nf_sys_io_filesystem_System_IO_File::DeleteNative___STATIC__VOID__STRING,
110+
Library_nf_sys_io_filesystem_System_IO_File::ExistsNative___STATIC__BOOLEAN__STRING__STRING,
111+
Library_nf_sys_io_filesystem_System_IO_File::GetAttributesNative___STATIC__U1__STRING,
112+
Library_nf_sys_io_filesystem_System_IO_File::GetLastWriteTimeNative___STATIC__SystemDateTime__STRING,
113+
Library_nf_sys_io_filesystem_System_IO_File::MoveNative___STATIC__VOID__STRING__STRING,
114+
Library_nf_sys_io_filesystem_System_IO_File::SetAttributesNative___STATIC__VOID__STRING__U1,
115+
NULL,
108116
NULL,
109117
NULL,
110118
NULL,
@@ -128,9 +136,9 @@ static const CLR_RT_MethodHandler method_lookup[] =
128136
const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_IO_FileSystem =
129137
{
130138
"System.IO.FileSystem",
131-
0x3AB74021,
139+
0x91DFAE15,
132140
method_lookup,
133-
{ 1, 0, 0, 0 }
141+
{ 1, 0, 0, 1 }
134142
};
135143

136144
// clang-format on

src/System.IO.FileSystem/nf_sys_io_filesystem.h

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,16 @@ struct Library_nf_sys_io_filesystem_System_IO_Directory
150150
//--//
151151
};
152152

153-
struct Library_nf_sys_io_filesystem_System_IO_File
154-
{
155-
NANOCLR_NATIVE_DECLARE(ExistsNative___STATIC__BOOLEAN__STRING__STRING);
156-
NANOCLR_NATIVE_DECLARE(MoveNative___STATIC__VOID__STRING__STRING);
157-
NANOCLR_NATIVE_DECLARE(DeleteNative___STATIC__VOID__STRING);
158-
NANOCLR_NATIVE_DECLARE(GetAttributesNative___STATIC__U1__STRING);
159-
NANOCLR_NATIVE_DECLARE(SetAttributesNative___STATIC__VOID__STRING__U1);
160-
NANOCLR_NATIVE_DECLARE(GetLastWriteTimeNative___STATIC__SystemDateTime__STRING);
161-
162-
//--//
163-
};
164-
165153
struct Library_nf_sys_io_filesystem_System_IO_FileStream
166154
{
167-
static const int FIELD___canRead = 2;
168-
static const int FIELD___canWrite = 3;
169-
static const int FIELD___canSeek = 4;
170-
static const int FIELD___seekLimit = 5;
171-
static const int FIELD___position = 6;
172-
static const int FIELD___disposed = 7;
173-
static const int FIELD___name = 8;
174-
static const int FIELD___path = 9;
155+
static const int FIELD___canRead = 1;
156+
static const int FIELD___canWrite = 2;
157+
static const int FIELD___canSeek = 3;
158+
static const int FIELD___seekLimit = 4;
159+
static const int FIELD___position = 5;
160+
static const int FIELD___disposed = 6;
161+
static const int FIELD___name = 7;
162+
static const int FIELD___path = 8;
175163

176164
NANOCLR_NATIVE_DECLARE(OpenFileNative___VOID__STRING__STRING__I4);
177165
NANOCLR_NATIVE_DECLARE(ReadNative___I4__STRING__STRING__I8__SZARRAY_U1__I4);
@@ -181,11 +169,25 @@ struct Library_nf_sys_io_filesystem_System_IO_FileStream
181169
//--//
182170
};
183171

172+
struct Library_nf_sys_io_filesystem_System_IO_File
173+
{
174+
static const int FIELD_STATIC__EmptyBytes = 2;
175+
176+
NANOCLR_NATIVE_DECLARE(DeleteNative___STATIC__VOID__STRING);
177+
NANOCLR_NATIVE_DECLARE(ExistsNative___STATIC__BOOLEAN__STRING__STRING);
178+
NANOCLR_NATIVE_DECLARE(GetAttributesNative___STATIC__U1__STRING);
179+
NANOCLR_NATIVE_DECLARE(GetLastWriteTimeNative___STATIC__SystemDateTime__STRING);
180+
NANOCLR_NATIVE_DECLARE(MoveNative___STATIC__VOID__STRING__STRING);
181+
NANOCLR_NATIVE_DECLARE(SetAttributesNative___STATIC__VOID__STRING__U1);
182+
183+
//--//
184+
};
185+
184186
struct Library_nf_sys_io_filesystem_System_IO_Path
185187
{
186-
static const int FIELD_STATIC__DirectorySeparatorChar = 2;
187-
static const int FIELD_STATIC__InvalidPathChars = 3;
188-
static const int FIELD_STATIC__m_illegalCharacters = 4;
188+
static const int FIELD_STATIC__DirectorySeparatorChar = 3;
189+
static const int FIELD_STATIC__InvalidPathChars = 4;
190+
static const int FIELD_STATIC__m_illegalCharacters = 5;
189191

190192
//--//
191193
};

0 commit comments

Comments
 (0)