mirror of
https://github.com/reactos/reactos.git
synced 2024-10-30 11:35:58 +00:00
7f5428633b
- In DoesFileExist(): Call NtOpenFile with FILE_GENERIC_READ instead of the more generic GENERIC_READ access right. - OpenAndMapFile(): Add support for opening & mapping files with write access (to be used latter). svn path=/branches/setup_improvements/; revision=74710 - Split IniCacheLoad() and IniCacheSave() into: themselves & IniCacheLoadByHandle() and IniCacheSaveByHandle(), respectively, so that we can load & save INI files if we already have an opened handle to them. svn path=/branches/setup_improvements/; revision=74711
85 lines
1.7 KiB
C
85 lines
1.7 KiB
C
/*
|
|
* 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
|
|
|
|
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);
|
|
|
|
NTSTATUS
|
|
ConcatPaths(
|
|
IN OUT PWSTR PathBuffer,
|
|
IN SIZE_T cchPathSize,
|
|
IN ULONG NumberOfPathComponents,
|
|
IN /* PCWSTR */ ...);
|
|
|
|
NTSTATUS
|
|
CombinePaths(
|
|
OUT PWSTR PathBuffer,
|
|
IN SIZE_T cchPathSize,
|
|
IN ULONG NumberOfPathComponents,
|
|
IN /* PCWSTR */ ...);
|
|
|
|
BOOLEAN
|
|
DoesPathExist(
|
|
IN HANDLE RootDirectory OPTIONAL,
|
|
IN PCWSTR PathName);
|
|
|
|
BOOLEAN
|
|
DoesFileExist(
|
|
IN HANDLE RootDirectory OPTIONAL,
|
|
IN PCWSTR PathNameToFile);
|
|
|
|
// FIXME: DEPRECATED! HACKish function that needs to be deprecated!
|
|
BOOLEAN
|
|
DoesFileExist_2(
|
|
IN PCWSTR PathName OPTIONAL,
|
|
IN PCWSTR FileName);
|
|
|
|
BOOLEAN
|
|
NtPathToDiskPartComponents(
|
|
IN PCWSTR NtPath,
|
|
OUT PULONG pDiskNumber,
|
|
OUT PULONG pPartNumber,
|
|
OUT PCWSTR* PathComponent OPTIONAL);
|
|
|
|
NTSTATUS
|
|
OpenAndMapFile(
|
|
IN HANDLE RootDirectory OPTIONAL,
|
|
IN PCWSTR PathNameToFile,
|
|
OUT PHANDLE FileHandle, // IN OUT PHANDLE OPTIONAL
|
|
OUT PHANDLE SectionHandle,
|
|
OUT PVOID* BaseAddress,
|
|
OUT PULONG FileSize OPTIONAL,
|
|
IN BOOLEAN ReadWriteAccess);
|
|
|
|
BOOLEAN
|
|
UnMapFile(
|
|
IN HANDLE SectionHandle,
|
|
IN PVOID BaseAddress);
|
|
|
|
/* EOF */
|