IOperatingSystemExplorerInterface
#include <OperatingSystemSimulator/Public/Interfaces/OperatingSystemExplorerInterface.h>class IOperatingSystemExplorerInterfaceDefined in OperatingSystemExplorerInterface.h:27
Subclassed by:
UOperatingSystemDirectory,UOperatingSystemPartition
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class IOperatingSystemExplorerInterface["IOperatingSystemExplorerInterface"]
class UOperatingSystemDirectory["UOperatingSystemDirectory"]
IOperatingSystemExplorerInterface <|-- UOperatingSystemDirectory
class UOperatingSystemPartition["UOperatingSystemPartition"]
IOperatingSystemExplorerInterface <|-- UOperatingSystemPartition
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class IOperatingSystemExplorerInterface {
+GetChildDirectories() const =0 TArray< UOperatingSystemDirectory() * >
+GetParentExplorerInterface(TScriptInterface< IOperatingSystemExplorerI
+IsPartition() const =0 bool
+GetInterfaceDisplayName() const =0 FText
+FindDirectoryByTag(const FGameplayTag DirectoryTag, const bool bool
+GetChildDirectory(const FString &TargetChildDirectoryName, co TScriptInterface< IOperatingSystemExplor
+GetAllFiles(const FString &WithExtension="*") const =0 TArray< UOperatingSystemFile() * >
+CanCreateNewFile() const =0 bool
+HasEnoughSpace(const FOperatingSystemSizeInMB &TestSpace) bool
+GetOperatingSystem() const =0 UOperatingSystem() *
+GetFullPath() const =0 TOptional< FString >
+GetInterfaceFromPath(const FString &NewPath) const =0 TScriptInterface< IOperatingSystemExplor
}
Interface for an operating system explorer.
This interface defines the functions that should be implemented by an operating system explorer class.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
TArray< UOperatingSystemDirectory * > | GetChildDirectories virtual const | This method retrieves an array of child directories of the current directory. |
void | GetParentExplorerInterface virtual const | Retrieves the parent explorer interface. For partition classes, OutInterface will always be null since there is nothing above partition. For directories however OutInterface will either be a parent directory or the parent partition. |
bool | IsPartition virtual const | Checks whether the object represents a partition or not. |
FText | GetInterfaceDisplayName virtual const | Retrieves the display name of the interface. |
bool | FindDirectoryByTag virtual const | Finds a directory by tag. |
TScriptInterface< IOperatingSystemExplorerInterface > | GetChildDirectory virtual const | Retrieves the child directory with the specified name. |
TArray< UOperatingSystemFile * > | GetAllFiles virtual const | Returns an array of UOperatingSystemFile objects containing all files in the operating system that match the specified extension. |
bool | CanCreateNewFile virtual const | Checks whether the current directory can create new files. |
bool | HasEnoughSpace virtual const | Checks whether the current directory has enough space to accommodate the specified test space. |
UOperatingSystem * | GetOperatingSystem virtual const | Retrieves the operating system associated with the operating system explorer. |
TOptional< FString > | GetFullPath virtual const | Retrieves the full path of the current directory. |
TScriptInterface< IOperatingSystemExplorerInterface > | GetInterfaceFromPath virtual const | Retrieves an interface from a specified path. |
GetChildDirectories
Section titled “GetChildDirectories”virtual const
virtual TArray< UOperatingSystemDirectory * > GetChildDirectories() constDefined in OperatingSystemExplorerInterface.h:38 This method retrieves an array of child directories of the current directory.
Reimplemented by
Section titled “Reimplemented by”GetParentExplorerInterface
Section titled “GetParentExplorerInterface”virtual const
virtual void GetParentExplorerInterface(TScriptInterface< IOperatingSystemExplorerInterface > & OutInterface) constDefined in OperatingSystemExplorerInterface.h:46 Retrieves the parent explorer interface. For partition classes, OutInterface will always be null since there is nothing above partition. For directories however OutInterface will either be a parent directory or the parent partition.
Parameters
Section titled “Parameters”OutInterfaceThe output parameter to store the parent explorer interface.
Reimplemented by
Section titled “Reimplemented by”IsPartition
Section titled “IsPartition”virtual const
virtual bool IsPartition() constDefined in OperatingSystemExplorerInterface.h:54 Checks whether the object represents a partition or not.
Returns
Section titled “Returns”true if the object represents a partition, false otherwise.
Reimplemented by
Section titled “Reimplemented by”GetInterfaceDisplayName
Section titled “GetInterfaceDisplayName”virtual const
virtual FText GetInterfaceDisplayName() constDefined in OperatingSystemExplorerInterface.h:62 Retrieves the display name of the interface.
Returns
Section titled “Returns”The display name of the interface as FText.
Reimplemented by
Section titled “Reimplemented by”FindDirectoryByTag
Section titled “FindDirectoryByTag”virtual const
virtual bool FindDirectoryByTag(const FGameplayTag DirectoryTag, const bool bRecursive, UOperatingSystemDirectory *& OutDirectory) constDefined in OperatingSystemExplorerInterface.h:73 Finds a directory by tag.
Parameters
Section titled “Parameters”-
DirectoryTagThe gameplay tag used to identify the directory. -
bRecursiveWhether to search recursively in subdirectories. -
OutDirectoryThe output parameter that will hold the found directory.
Returns
Section titled “Returns”True if a directory with the specified tag was found, false otherwise.
Reimplemented by
Section titled “Reimplemented by”GetChildDirectory
Section titled “GetChildDirectory”virtual const
virtual TScriptInterface< IOperatingSystemExplorerInterface > GetChildDirectory(const FString & TargetChildDirectoryName, const bool bRecursive = true) constDefined in OperatingSystemExplorerInterface.h:84 Retrieves the child directory with the specified name.
Parameters
Section titled “Parameters”-
TargetChildDirectoryNameThe name of the child directory to retrieve. -
bRecursiveIndicates whether to search for the child directory recursively. Default is true.
Returns
Section titled “Returns”The child directory with the specified name, if found. Otherwise, returns nullptr.
Reimplemented by
Section titled “Reimplemented by”GetAllFiles
Section titled “GetAllFiles”virtual const
virtual TArray< UOperatingSystemFile * > GetAllFiles(const FString & WithExtension = "*") constDefined in OperatingSystemExplorerInterface.h:93 Returns an array of UOperatingSystemFile objects containing all files in the operating system that match the specified extension.
Parameters
Section titled “Parameters”WithExtensionThe extension filter to apply when retrieving files. Defaults to ”*” which retrieves all files.
Returns
Section titled “Returns”An array of UOperatingSystemFile objects representing the files that match the specified extension.
Reimplemented by
Section titled “Reimplemented by”CanCreateNewFile
Section titled “CanCreateNewFile”virtual const
virtual bool CanCreateNewFile() constDefined in OperatingSystemExplorerInterface.h:100 Checks whether the current directory can create new files.
Returns
Section titled “Returns”True if the current directory can create new files, false otherwise.
Reimplemented by
Section titled “Reimplemented by”HasEnoughSpace
Section titled “HasEnoughSpace”virtual const
virtual bool HasEnoughSpace(const FOperatingSystemSizeInMB & TestSpace) constDefined in OperatingSystemExplorerInterface.h:110 Checks whether the current directory has enough space to accommodate the specified test space.
This method checks whether the current directory has enough space to accommodate the specified test space.
Parameters
Section titled “Parameters”TestSpaceThe test space to check, specified as a FOperatingSystemSizeInMB object.
Returns
Section titled “Returns”True if the current directory has enough space, false otherwise.
Reimplemented by
Section titled “Reimplemented by”GetOperatingSystem
Section titled “GetOperatingSystem”virtual const
virtual UOperatingSystem * GetOperatingSystem() constDefined in OperatingSystemExplorerInterface.h:117 Retrieves the operating system associated with the operating system explorer.
Returns
Section titled “Returns”A pointer to the operating system object. Returns nullptr if no operating system is associated.
Reimplemented by
Section titled “Reimplemented by”GetFullPath
Section titled “GetFullPath”virtual const
virtual TOptional< FString > GetFullPath() constDefined in OperatingSystemExplorerInterface.h:126 Retrieves the full path of the current directory.
This method retrieves the full path of the current directory.
Returns
Section titled “Returns”An optional FString containing the full path of the current directory, if available. Otherwise, returns an empty optional.
Reimplemented by
Section titled “Reimplemented by”GetInterfaceFromPath
Section titled “GetInterfaceFromPath”virtual const
virtual TScriptInterface< IOperatingSystemExplorerInterface > GetInterfaceFromPath(const FString & NewPath) constDefined in OperatingSystemExplorerInterface.h:136 Retrieves an interface from a specified path.
This method retrieves an interface from a specified path. The path is used to locate the desired interface in the operating system.
Parameters
Section titled “Parameters”NewPathThe path to the interface.
Returns
Section titled “Returns”The interface requested, represented as TScriptInterface<IOperatingSystemExplorerInterface>.