Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCodingServer/Private/External/LC_FileUtil.h
ben marsh cf183af67c Integrating live coding feature (aka Live++) into UE4.
Allows fast iteration of C++ changes without restarting the application. To use, select the "Live Coding (Experimental)" mode from the drop down menu next to the editor's compile button, or type "LiveCoding" into the console for a monolithic build. Press Ctrl+Alt+F11 to find changes and compile.

Changes vs standalone Live++ version:

* UBT is used to execute builds. This allows standard UE4 adaptive unity mode, allows us to reuse object files when we do regular builds, supports using any build executor allowed by UBT (XGE, SNDBS, etc..).
* Adding new source files is supported.
* Custom visualizer for FNames is supported via a weakly linked symbol in a static library (Engine/Extras/NatvisHelpers).
* Settings are exposed in the editor's project settings dialog.
* Standalone application has been rewritten as a Slate app ("LiveCodingConsole"). There is an additional option to start the program as hidden, where it will not be visible until Ctrl+Alt+F11 is hit. Similarly, closing the window will hide it instead of closing the application.
* Does not require a standalone licensed version of Live++.

Known issues:

* Does not currently support class layout changes / object reinstancing

#rb none
[FYI] Marc.Audy, Stefan.Boberg, Nick.Penwarden
#jira

#ROBOMERGE-SOURCE: CL 5304722 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5309051 by ben marsh in Main branch]
2019-03-05 18:49:25 -05:00

67 lines
2.1 KiB
C++

// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
#pragma once
#include "CoreTypes.h"
#include "LC_Types.h"
#include "Windows/WindowsHWrapper.h"
namespace file
{
struct Attributes
{
WIN32_FILE_ATTRIBUTE_DATA data;
};
void Startup(void);
void Shutdown(void);
Attributes GetAttributes(const wchar_t* path);
uint64_t GetLastModificationTime(const Attributes& attributes);
bool DoesExist(const Attributes& attributes);
bool IsDirectory(const Attributes& attributes);
uint64_t GetSize(const Attributes& attributes);
void Copy(const wchar_t* srcPath, const wchar_t* destPath);
void Delete(const wchar_t* path);
bool DeleteIfExists(const wchar_t* path);
bool IsRelativePath(const wchar_t* path);
// creates a unique, temporary absolute filename, e.g. C:\Users\JohnDoe\AppData\Local\Temp\ABCD.tmp
std::wstring CreateTempFile(void);
// creates a file, storing the given data
bool CreateFileWithData(const wchar_t* path, const void* data, size_t size);
// returns the directory-only part of a given path
std::wstring GetDirectory(const std::wstring& path);
// returns the file-only part of a given path
std::wstring GetFilename(const std::wstring& path);
// returns the extension-only part of a given path, e.g. '.bat', '.exe'
std::wstring GetExtension(const std::wstring& path);
// returns the given path without any file extensions
std::wstring RemoveExtension(const std::wstring& path);
// canonicalizes/normalizes any given path
std::wstring NormalizePath(const wchar_t* path);
// canonicalizes/normalizes any given path without resolving any symbolic links/virtual drives.
// note: this is not cached internally and should only be used for cosmetic purposes.
std::wstring NormalizePathWithoutLinks(const wchar_t* path);
// converts a relative into an absolute path
std::wstring RelativeToAbsolutePath(const wchar_t* path);
// moves a file
void Move(const wchar_t* currentPath, const wchar_t* movedToPath);
// recursively enumerates all files in a directory
types::vector<std::wstring> EnumerateFiles(const wchar_t* directory);
}