Files
o3de/Code/Framework/AzFramework/AzFramework/IO/FileOperations.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

41 lines
1.6 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#ifndef CRYCOMMON_FILEOPERATIONS_H
#define CRYCOMMON_FILEOPERATIONS_H
#include <AzCore/IO/FileIO.h>
namespace AZ
{
namespace IO
{
int64_t Print(HandleType fileHandle, const char* format, ...);
int64_t PrintV(HandleType fileHandle, const char* format, va_list arglist);
AZ::IO::Result Move(const char* sourceFilePath, const char* destinationFilePath);
/**
* This function only tries to move/copy the sourceFile to the destination file
* This will only return success if it was able to move/copy the sourceFile to the destination file.
**/
AZ::IO::Result SmartMove(const char* sourceFile, const char* destinationFile);
/**
* Generate an unused filename from an input file name
* by prepending "$tmpN_" to it (N is a random integer).
* SourceFile must be an absolute path, it can have alias in the path.
* Returns false if unable to find an unused name despite multiple attempts.
**/
bool CreateTempFileName(const char* file, AZStd::string& tempFile);
int GetC(HandleType fileHandle);
int UnGetC(int character, HandleType fileHandle);
char* FGetS(char* buffer, uint64_t bufferSize, HandleType fileHandle);
int FPutS(const char* buffer, HandleType fileHandle);
}
}
#endif // #ifndef CRYCOMMON_FILEOPERATIONS_H