9ba528a0c706fc6135ce1c1f4b4c8c6c24e6a95e
[reactos.git] / base / setup / lib / filesup.h
1 /*
2 * PROJECT: ReactOS Setup Library
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: File support functions.
5 * COPYRIGHT: Copyright 2017-2018 Hermes Belusca-Maito
6 */
7
8 #pragma once
9
10 #if 0
11
12 BOOLEAN
13 IsValidPath(
14 IN PCWSTR InstallDir);
15
16 #endif
17
18 NTSTATUS
19 ConcatPathsV(
20 IN OUT PWSTR PathBuffer,
21 IN SIZE_T cchPathSize,
22 IN ULONG NumberOfPathComponents,
23 IN va_list PathComponentsList);
24
25 NTSTATUS
26 CombinePathsV(
27 OUT PWSTR PathBuffer,
28 IN SIZE_T cchPathSize,
29 IN ULONG NumberOfPathComponents,
30 IN va_list PathComponentsList);
31
32 NTSTATUS
33 ConcatPaths(
34 IN OUT PWSTR PathBuffer,
35 IN SIZE_T cchPathSize,
36 IN ULONG NumberOfPathComponents,
37 IN /* PCWSTR */ ...);
38
39 NTSTATUS
40 CombinePaths(
41 OUT PWSTR PathBuffer,
42 IN SIZE_T cchPathSize,
43 IN ULONG NumberOfPathComponents,
44 IN /* PCWSTR */ ...);
45
46 BOOLEAN
47 DoesPathExist(
48 IN HANDLE RootDirectory OPTIONAL,
49 IN PCWSTR PathName);
50
51 BOOLEAN
52 DoesFileExist(
53 IN HANDLE RootDirectory OPTIONAL,
54 IN PCWSTR PathName OPTIONAL,
55 IN PCWSTR FileName);
56
57 BOOLEAN
58 NtPathToDiskPartComponents(
59 IN PCWSTR NtPath,
60 OUT PULONG pDiskNumber,
61 OUT PULONG pPartNumber,
62 OUT PCWSTR* PathComponent OPTIONAL);
63
64 NTSTATUS
65 OpenAndMapFile(
66 IN HANDLE RootDirectory OPTIONAL,
67 IN PCWSTR PathName OPTIONAL,
68 IN PCWSTR FileName, // OPTIONAL
69 OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL
70 OUT PHANDLE SectionHandle,
71 OUT PVOID* BaseAddress,
72 OUT PULONG FileSize OPTIONAL);
73
74 BOOLEAN
75 UnMapFile(
76 IN HANDLE SectionHandle,
77 IN PVOID BaseAddress);
78
79 /* EOF */