-
Notifications
You must be signed in to change notification settings - Fork 242
/
CUFileComponent.h
47 lines (35 loc) · 3.32 KB
/
CUFileComponent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2018-current Getnamo. All Rights Reservedfrom UCUFileSubsystem. This component will be removed in the next stable version."
#pragma once
#include "Components/ActorComponent.h"
#include "CUFileComponent.generated.h"
/**
* Convenience component to save/load data from files
*/
UCLASS(ClassGroup = "Utility", meta = (BlueprintSpawnableComponent))
class COREUTILITY_API UCUFileComponent : public UActorComponent
{
GENERATED_UCLASS_BODY()
public:
/** Get the current project contents directory path*/
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
FString ProjectContentsDirectory();
/** Get the current project directory path*/
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
FString ProjectDirectory();
/** Get the current project saved directory path*/
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
FString ProjectSavedDirectory();
/** External storage in android context, otherwise uses project saved directory*/
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
FString ExternalSaveDirectory();
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
void SplitFullPath(const FString& InFullPath, FString& OutDirectory, FString& OutFileName);
UFUNCTION(BlueprintPure, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
void ProjectRelativePath(const FString& InFullPath, FString& OutProjectRelativePath);
/** Save array of bytes to file at specified directory */
UFUNCTION(BlueprintCallable, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
bool SaveBytesToFile(const TArray<uint8>& Bytes, const FString& Directory, const FString& FileName, bool bLogSave = false);
/** Read array of bytes from file at specified directory */
UFUNCTION(BlueprintCallable, Category = FileUtility, meta = (DeprecatedFunction, DeprecationMessage = "UCUFileComponent has been deprecated, Please use the same functions from UCUFileSubsystem. This component will be removed in the next stable version."))
bool ReadBytesFromFile(const FString& Directory, const FString& FileName, TArray<uint8>& OutBytes);
};