2017-05-23 11:39:12 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Setup Library
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
|
|
* PURPOSE: File support functions.
|
|
|
|
* COPYRIGHT: Copyright 2017-2018 Hermes Belusca-Maito
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
IsValidPath(
|
|
|
|
IN PCWSTR InstallDir);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 22:30:54 +00:00
|
|
|
NTSTATUS
|
|
|
|
ConcatPathsV(
|
|
|
|
IN OUT PWSTR PathBuffer,
|
|
|
|
IN SIZE_T cchPathSize,
|
|
|
|
IN ULONG NumberOfPathComponents,
|
|
|
|
IN va_list PathComponentsList);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
CombinePathsV(
|
|
|
|
OUT PWSTR PathBuffer,
|
|
|
|
IN SIZE_T cchPathSize,
|
|
|
|
IN ULONG NumberOfPathComponents,
|
|
|
|
IN va_list PathComponentsList);
|
|
|
|
|
2017-05-23 11:39:12 +00:00
|
|
|
NTSTATUS
|
|
|
|
ConcatPaths(
|
2017-05-23 22:30:54 +00:00
|
|
|
IN OUT PWSTR PathBuffer,
|
|
|
|
IN SIZE_T cchPathSize,
|
|
|
|
IN ULONG NumberOfPathComponents,
|
|
|
|
IN /* PCWSTR */ ...);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
CombinePaths(
|
|
|
|
OUT PWSTR PathBuffer,
|
2017-05-23 11:39:12 +00:00
|
|
|
IN SIZE_T cchPathSize,
|
2017-05-23 22:30:54 +00:00
|
|
|
IN ULONG NumberOfPathComponents,
|
|
|
|
IN /* PCWSTR */ ...);
|
2017-05-23 11:39:12 +00:00
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
DoesPathExist(
|
|
|
|
IN HANDLE RootDirectory OPTIONAL,
|
|
|
|
IN PCWSTR PathName);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
DoesFileExist(
|
|
|
|
IN HANDLE RootDirectory OPTIONAL,
|
2017-05-24 16:37:49 +00:00
|
|
|
IN PCWSTR PathNameToFile);
|
|
|
|
|
|
|
|
// FIXME: DEPRECATED! HACKish function that needs to be deprecated!
|
|
|
|
BOOLEAN
|
|
|
|
DoesFileExist_2(
|
2017-05-23 11:39:12 +00:00
|
|
|
IN PCWSTR PathName OPTIONAL,
|
|
|
|
IN PCWSTR FileName);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
NtPathToDiskPartComponents(
|
|
|
|
IN PCWSTR NtPath,
|
|
|
|
OUT PULONG pDiskNumber,
|
|
|
|
OUT PULONG pPartNumber,
|
|
|
|
OUT PCWSTR* PathComponent OPTIONAL);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
OpenAndMapFile(
|
2017-05-31 00:18:13 +00:00
|
|
|
IN HANDLE RootDirectory OPTIONAL,
|
|
|
|
IN PCWSTR PathNameToFile,
|
2017-05-23 11:39:12 +00:00
|
|
|
OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL
|
|
|
|
OUT PHANDLE SectionHandle,
|
|
|
|
OUT PVOID* BaseAddress,
|
2017-05-31 00:18:13 +00:00
|
|
|
OUT PULONG FileSize OPTIONAL,
|
|
|
|
IN BOOLEAN ReadWriteAccess);
|
2017-05-23 11:39:12 +00:00
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
UnMapFile(
|
|
|
|
IN HANDLE SectionHandle,
|
|
|
|
IN PVOID BaseAddress);
|
|
|
|
|
|
|
|
/* EOF */
|