You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
/**
|
|
* Helper struct to hold and quickly access server TOC.
|
|
*/
|
|
struct SOCKETS_API FServerTOC
|
|
{
|
|
/** List of files in a directory. */
|
|
typedef TMap<FString, FDateTime> FDirectory;
|
|
|
|
/** This is the "TOC" of the server */
|
|
TMap<FString, FDirectory*> Directories;
|
|
|
|
/** Destructor. Destroys directories. */
|
|
~FServerTOC();
|
|
|
|
/**
|
|
* Adds a file or directory to TOC.
|
|
*
|
|
* @param Filename File name or directory name to add.
|
|
* @param Timestamp File timestamp. Directories should have this set to 0.
|
|
*/
|
|
void AddFileOrDirectory(const FString& Filename, const FDateTime& Timestamp);
|
|
|
|
/**
|
|
* Finds a file in TOC.
|
|
*
|
|
* @param Filename File name to find.
|
|
* @return Pointer to a timestamp if the file was found, NULL otherwise.
|
|
*/
|
|
const FDateTime* FindFile(const FString& Filename) const;
|
|
|
|
/**
|
|
* Finds a directory in TOC.
|
|
*
|
|
* @param Directory Directory to find.
|
|
* @return Pointer to a FDirectory if the directory was found, NULL otherwise.
|
|
*/
|
|
const FDirectory* FindDirectory(const FString& Directory) const;
|
|
|
|
/**
|
|
* Finds a directory in TOC non const version used internally
|
|
* see FindDirectory
|
|
*
|
|
* @param Directory Directory to find
|
|
* @return pointer to a FDirectory if the directory was found, null otherwise
|
|
*/
|
|
FDirectory* FindDirectory(const FString& Directory);
|
|
|
|
|
|
int32 RemoveFileOrDirectory(const FString& Filename);
|
|
};
|