1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5#ifndef _WIN_PATH_APIS_WRAPPER_
6#define _WIN_PATH_APIS_WRAPPER_
7class SString;
8
9HMODULE
10LoadLibraryExWrapper(
11 _In_ LPCWSTR lpLibFileName,
12 _Reserved_ HANDLE hFile = NULL,
13 _In_ DWORD dwFlags = 0
14 );
15
16HANDLE
17CreateFileWrapper(
18 _In_ LPCWSTR lpFileName,
19 _In_ DWORD dwDesiredAccess,
20 _In_ DWORD dwShareMode,
21 _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
22 _In_ DWORD dwCreationDisposition,
23 _In_ DWORD dwFlagsAndAttributes,
24 _In_opt_ HANDLE hTemplateFile
25 );
26
27BOOL
28SetFileAttributesWrapper(
29 _In_ LPCWSTR lpFileName,
30 _In_ DWORD dwFileAttributes
31 );
32
33DWORD
34GetFileAttributesWrapper(
35 _In_ LPCWSTR lpFileName
36 );
37
38BOOL
39GetFileAttributesExWrapper(
40 _In_ LPCWSTR lpFileName,
41 _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
42 _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation
43 );
44BOOL
45DeleteFileWrapper(
46 _In_ LPCWSTR lpFileName
47 );
48
49HANDLE
50FindFirstFileExWrapper(
51 _In_ LPCWSTR lpFileName,
52 _In_ FINDEX_INFO_LEVELS fInfoLevelId,
53 _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
54 _In_ FINDEX_SEARCH_OPS fSearchOp,
55 _Reserved_ LPVOID lpSearchFilter,
56 _In_ DWORD dwAdditionalFlags
57 );
58
59BOOL
60CopyFileWrapper(
61 _In_ LPCWSTR lpExistingFileName,
62 _In_ LPCWSTR lpNewFileName,
63 _In_ BOOL bFailIfExists
64 );
65
66#ifndef FEATURE_PAL
67BOOL
68CopyFileExWrapper(
69 _In_ LPCWSTR lpExistingFileName,
70 _In_ LPCWSTR lpNewFileName,
71 _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine,
72 _In_opt_ LPVOID lpData,
73 _When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE))
74 _Inout_opt_ LPBOOL pbCancel,
75 _In_ DWORD dwCopyFlags
76 );
77#endif //FEATURE_PAL
78
79BOOL
80MoveFileExWrapper(
81 _In_ LPCWSTR lpExistingFileName,
82 _In_opt_ LPCWSTR lpNewFileName,
83 _In_ DWORD dwFlags
84 );
85
86BOOL
87CreateDirectoryWrapper(
88 _In_ LPCWSTR lpPathName,
89 _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
90 );
91
92BOOL
93RemoveDirectoryWrapper(
94 _In_ LPCWSTR lpPathName
95 );
96
97BOOL
98CreateHardLinkWrapper(
99 _In_ LPCWSTR lpFileName,
100 _In_ LPCWSTR lpExistingFileName,
101 _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
102 );
103
104DWORD
105SearchPathWrapper(
106 _In_opt_ LPCWSTR lpPath,
107 _In_ LPCWSTR lpFileName,
108 _In_opt_ LPCWSTR lpExtension,
109 _In_ BOOL getPath,
110 SString& lpBuffer,
111 _Out_opt_ LPWSTR * lpFilePart
112 );
113
114
115DWORD
116GetShortPathNameWrapper(
117 _In_ LPCWSTR lpszLongPath,
118 SString& lpszShortPath
119 );
120
121DWORD
122GetLongPathNameWrapper(
123 _In_ LPCWSTR lpszShortPath,
124 SString& lpszLongPath
125 );
126
127UINT WINAPI GetTempFileNameWrapper(
128 _In_ LPCTSTR lpPathName,
129 _In_ LPCTSTR lpPrefixString,
130 _In_ UINT uUnique,
131 SString& lpTempFileName
132 );
133
134DWORD WINAPI GetTempPathWrapper(
135 SString& lpBuffer
136 );
137
138DWORD WINAPI GetCurrentDirectoryWrapper(
139 SString& lpBuffer
140 );
141
142DWORD
143GetModuleFileNameWrapper(
144 _In_opt_ HMODULE hModule,
145 SString& buffer
146 );
147
148DWORD WINAPI GetEnvironmentVariableWrapper(
149 _In_opt_ LPCTSTR lpName,
150 _Out_opt_ SString& lpBuffer
151 );
152
153BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer);
154
155#endif //_WIN_PATH_APIS_WRAPPER_
156
157