reactos/base/setup/usetup/filesup.h
Hermès Bélusca-Maïto 55d8a8490c
[USETUP] Introduce SetupDeleteFile() and SetupMoveFile() (in addition to the already-existing SetupCopyFile()) in order to implement moving / renaming existing files.
Will be used soon to make backups of system files, like the registry hive files just freshly created.
- Make the SetupCopyFile() function closer to its win32 counterpart.
- Adjust the code that calls SetupCopyFile().

svn path=/branches/setup_improvements/; revision=75008
svn path=/branches/setup_improvements/; revision=75009
2018-10-25 00:58:22 +02:00

59 lines
1.1 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: base/setup/usetup/filesup.h
* PURPOSE: File support functions
* PROGRAMMER:
*/
#pragma once
NTSTATUS
SetupCreateDirectory(
PWCHAR DirectoryName);
NTSTATUS
SetupDeleteFile(
IN PCWSTR FileName,
IN BOOLEAN ForceDelete); // ForceDelete can be used to delete read-only files
NTSTATUS
SetupCopyFile(
IN PCWSTR SourceFileName,
IN PCWSTR DestinationFileName,
IN BOOLEAN FailIfExists);
#ifndef _WINBASE_
#define MOVEFILE_REPLACE_EXISTING 1
#define MOVEFILE_COPY_ALLOWED 2
#define MOVEFILE_WRITE_THROUGH 8
#endif
// ACHTUNG! HAXX FIXME!!
#define _SEH2_TRY
#define _SEH2_LEAVE goto __SEH2_FINALLY__label;
#define _SEH2_FINALLY __SEH2_FINALLY__label:
#define _SEH2_END
NTSTATUS
SetupMoveFile(
IN PCWSTR ExistingFileName,
IN PCWSTR NewFileName,
IN ULONG Flags);
NTSTATUS
SetupExtractFile(
PWCHAR CabinetFileName,
PWCHAR SourceFileName,
PWCHAR DestinationFileName);
BOOLEAN
IsValidPath(
IN PCWSTR InstallDir);
/* EOF */