UOperatingSystemDirectory
#include <OperatingSystemSimulator/Public/Core/OperatingSystemDirectory.h>class UOperatingSystemDirectoryDefined in OperatingSystemDirectory.h:23
Inherits:
UObject,IOperatingSystemExplorerInterfaceSubclassed by:UOperatingSystemDir_Desktop,UOperatingSystemDir_Documents,UOperatingSystemDir_Downloads,UOperatingSystemDir_Music,UOperatingSystemDir_Pictures,UOperatingSystemDir_Users,UOperatingSystemDir_Videos,UOperatingSystemRootDirectory
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemDirectory["UOperatingSystemDirectory"]
class UObject["UObject"]
UObject <|-- UOperatingSystemDirectory
class IOperatingSystemExplorerInterface["IOperatingSystemExplorerInterface"]
IOperatingSystemExplorerInterface <|-- UOperatingSystemDirectory
class UOperatingSystemDir_Desktop["UOperatingSystemDir_Desktop"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Desktop
class UOperatingSystemDir_Documents["UOperatingSystemDir_Documents"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Documents
class UOperatingSystemDir_Downloads["UOperatingSystemDir_Downloads"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Downloads
class UOperatingSystemDir_Music["UOperatingSystemDir_Music"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Music
class UOperatingSystemDir_Pictures["UOperatingSystemDir_Pictures"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Pictures
class UOperatingSystemDir_Users["UOperatingSystemDir_Users"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Users
class UOperatingSystemDir_Videos["UOperatingSystemDir_Videos"]
UOperatingSystemDirectory <|-- UOperatingSystemDir_Videos
class UOperatingSystemRootDirectory["UOperatingSystemRootDirectory"]
UOperatingSystemDirectory <|-- UOperatingSystemRootDirectory
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemDirectory["UOperatingSystemDirectory"]
class UOperatingSystemFile["UOperatingSystemFile"]
UOperatingSystemDirectory *-- UOperatingSystemFile
class UOperatingSystemDirectoriesCollection["UOperatingSystemDirectoriesCollection"]
UOperatingSystemDirectory *-- UOperatingSystemDirectoriesCollection
class UOperatingSystemPartition["UOperatingSystemPartition"]
UOperatingSystemDirectory *-- UOperatingSystemPartition
class UOperatingSystem["UOperatingSystem"]
UOperatingSystemDirectory *-- UOperatingSystem
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemDirectory {
+UOperatingSystemDirectory()
+GetDirectoryName() const FText
+IsSystemDirectory() const bool
+GetDirectoryIconObject() const UObject *
+GetChildDirectories() const override final TArray< UOperatingSystemDirectory() * >
+GetParentExplorerInterface(TScriptInterface< IOperatingSystemExplorerI
+IsPartition() const override final bool
+GetInterfaceDisplayName() const override final FText
+FindDirectoryByTag(const FGameplayTag DirectoryTag, const bool bool
+GetChildDirectory(const FString &TargetChildDirectoryName, co TScriptInterface< IOperatingSystemExplor
+GetAllFiles(const FString &WithExtension="*") const ove TArray< UOperatingSystemFile() * >
+CanCreateNewFile() const override final bool
+HasEnoughSpace(const FOperatingSystemSizeInMB &TestSpace) bool
+GetOperatingSystem() const override final UOperatingSystem() *
+GetFullPath() const override final TOptional< FString >
+GetInterfaceFromPath(const FString &NewPath) const override fina TScriptInterface< IOperatingSystemExplor
+IsUnixRootDirectory() const bool
+LoadFiles(const FOperatingSystemDirectoriesSaveLoad &
+GetDirectoryPath() const FString
+GetSaveData(TArray< FOperatingSystemDirectoriesSaveLoad
+CheckForDirectoryWithTag(const FGameplayTag &TestTag, const bool bRe bool
+CanCreateNewFolder() const bool
+CanRename() const bool
+GetDirectoryTag() const FGameplayTag
+GetAs() const T *
+GetAsConst() const const T *
+GetChildDirectory(const FString &TargetChildDirectoryName, co T *
+CreateDirectory(const TWeakObjectPtr< UOperatingSystemParti UOperatingSystemDirectory() *
+CreateDirectory(const TWeakObjectPtr< UOperatingSystemParti T *
+Name : FText
+Tag : FGameplayTag
+OverrideIcon : TSoftObjectPtr< UObject >
+bCanCreateNewFolder : uint8
+bCanCreateNewFile : uint8
+bIsHidden : uint8
+FileClasses : TSet< TSoftClassPtr< UOperatingSystemFil
+ChildDirectoryCollection : TSoftObjectPtr< UOperatingSystemDirector
+ParentDirectory : TWeakObjectPtr< UOperatingSystemDirector
+ParentPartition : TWeakObjectPtr< UOperatingSystemPartitio
+Files : TArray< TObjectPtr< UOperatingSystemFile
+ChildDirectories : TArray< TObjectPtr< UOperatingSystemDire
+ParentOS : TWeakObjectPtr< UOperatingSystem() >
+OnValidate(FGenericError &OutError)
+Internal_Validate(FGenericError &OutError)
+Internal_GetDirectoryFromPathUnix(const FString &NewPath) const TScriptInterface< IOperatingSystemExplor
+Internal_GetDirectoryFromPathNonUnix(const FString &NewPath) const TScriptInterface< IOperatingSystemExplor
}
Caller impact — CreateDirectory
Section titled “Caller impact — CreateDirectory”Documented call sites inside the plugin (3):
flowchart LR UOperatingSystemDirectory__CreateDirectory["UOperatingSystemDirectory::CreateDirectory"] UOperatingSystemNonUnix__CreateDirectoryInPath["UOperatingSystemNonUnix::CreateDirectoryInPath"] UOperatingSystemNonUnix__CreateDirectoryInPath --> UOperatingSystemDirectory__CreateDirectory UOperatingSystemUnix__CreateDirectoryInPath["UOperatingSystemUnix::CreateDirectoryInPath"] UOperatingSystemUnix__CreateDirectoryInPath --> UOperatingSystemDirectory__CreateDirectory UOperatingSystem__Internal_CreateDefaultDirectories["UOperatingSystem::Internal_CreateDefaultDirectories"] UOperatingSystem__Internal_CreateDefaultDirectories --> UOperatingSystemDirectory__CreateDirectory
Caller impact — GetFullPath
Section titled “Caller impact — GetFullPath”Documented call sites inside the plugin (3):
flowchart LR UOperatingSystemDirectory__GetFullPath["UOperatingSystemDirectory::GetFullPath"] UOperatingSystemDirectory__CreateDirectory["UOperatingSystemDirectory::CreateDirectory"] UOperatingSystemDirectory__CreateDirectory --> UOperatingSystemDirectory__GetFullPath UOperatingSystemDirectory__GetDirectoryPath["UOperatingSystemDirectory::GetDirectoryPath"] UOperatingSystemDirectory__GetDirectoryPath --> UOperatingSystemDirectory__GetFullPath UOperatingSystemDirectory__LoadFiles["UOperatingSystemDirectory::LoadFiles"] UOperatingSystemDirectory__LoadFiles --> UOperatingSystemDirectory__GetFullPath
The UOperatingSystemDirectory class represents an operating system directory. It inherits from UObject and implements the IOperatingSystemExplorerInterface. This class provides functionalities for creating, managing, and accessing directories in an operating system.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemDirectory | ||
FText | GetDirectoryName const | Returns the name of this directory. |
bool | IsSystemDirectory const | Checks if the directory is classified as a system directory. |
UObject * | GetDirectoryIconObject const | Returns the directory icon object. |
TArray< UOperatingSystemDirectory * > | GetChildDirectories virtual const inline override final | Get the child directories of the current operating system directory. |
void | GetParentExplorerInterface virtual const override final | Retrieves the parent explorer interface of the operating system directory. |
bool | IsPartition virtual const inline override final | Check if the directory is a partition. This method checks whether the directory is a partition or not. |
FText | GetInterfaceDisplayName virtual const inline override final | Returns the display name of the interface. This method returns the display name of the interface as a FText object. The display name is a textual representation of the interface. |
bool | FindDirectoryByTag virtual const override final | Finds a directory by tag. This method searches for a directory with the specified tag within the current directory and, optionally, within its child directories recursively. |
TScriptInterface< IOperatingSystemExplorerInterface > | GetChildDirectory virtual const override final | Retrieves a child directory with the specified name. This method searches for a child directory with the given name in the current directory. If the child directory is found, it is returned. |
TArray< UOperatingSystemFile * > | GetAllFiles virtual const override final | GetAllFiles is a method that returns an array of operating system files in the directory. |
bool | CanCreateNewFile virtual const inline override final | Determines whether the operating system directory can create a new file. |
bool | HasEnoughSpace virtual const override final | Determines if the operating system directory has enough space to hold a given amount of data. |
UOperatingSystem * | GetOperatingSystem virtual const override final | Returns the operating system object associated with the directory. |
TOptional< FString > | GetFullPath virtual const override final | Retrieves the full path of the operating system directory. This method returns the full path of the operating system directory by traversing through its parent directories and concatenating the directory names. |
TScriptInterface< IOperatingSystemExplorerInterface > | GetInterfaceFromPath virtual const override final | 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. |
bool | IsUnixRootDirectory virtual const inline | DO NOT MODIFY THIS! |
void | LoadFiles | Load the files from the provided FOperatingSystemDirectoriesSaveLoad object. This method creates UOperatingSystemFile objects for each file specified in the SaveLoad_Files array of the FOperatingSystemDirectoriesSaveLoad object and adds them to the Files array of the UOperatingSystemDirectory object. It also checks if there are any newly added file classes in the FileClasses array of the UOperatingSystemDirectory object, and creates UOperatingSystemFile objects for each newly added file class, if necessary. |
FString | GetDirectoryPath const | Same as GetFullPath except this removes the directory name from the path. |
void | GetSaveData const | Retrieves the save data for the operating system directories. |
bool | CheckForDirectoryWithTag const | Check if the directory has a specific tag. |
bool | CanCreateNewFolder const inline | Checks if the user has permission to create a new folder. |
bool | CanRename const inline | Checks if the directory can be renamed. |
FGameplayTag | GetDirectoryTag const inline | Retrieves the directory tag. |
T * | GetAs const inline | Returns a pointer to the current object casted to the specified type. The specified type, T, must be derived from the UOperatingSystemDirectory class. |
const T * | GetAsConst const inline | Returns a pointer to the current object casted to the specified type. The specified type, T, must be derived from the UOperatingSystemDirectory class. |
T * | GetChildDirectory virtual const inline | Retrieves a child directory with the given name. |
UOperatingSystemDirectory
Section titled “UOperatingSystemDirectory”UOperatingSystemDirectory()Defined in OperatingSystemDirectory.h:114
Section titled “Defined in OperatingSystemDirectory.h:114”GetDirectoryName
Section titled “GetDirectoryName”const
FText GetDirectoryName() constDefined in OperatingSystemDirectory.h:174 Returns the name of this directory.
Returns
Section titled “Returns”The name of the directory as a FText object.
See also: UOperatingSystemStatics::GetSpecialDirectoryName()
Referenced by
Section titled “Referenced by”References
Section titled “References”IsSystemDirectory
Section titled “IsSystemDirectory”const
bool IsSystemDirectory() constDefined in OperatingSystemDirectory.h:181 Checks if the directory is classified as a system directory.
Returns
Section titled “Returns”True if the directory is a system directory, false otherwise.
References
Section titled “References”GetDirectoryIconObject
Section titled “GetDirectoryIconObject”const
UObject * GetDirectoryIconObject() constDefined in OperatingSystemDirectory.h:188 Returns the directory icon object.
Returns
Section titled “Returns”The directory icon object.
Referenced by
Section titled “Referenced by”References
Section titled “References”GetChildDirectories
Section titled “GetChildDirectories”virtual const inline override final
virtual inline TArray< UOperatingSystemDirectory * > GetChildDirectories() const override finalDefined in OperatingSystemDirectory.h:197 Get the child directories of the current operating system directory.
Returns
Section titled “Returns”An array of UOperatingSystemDirectory pointers representing the child directories.
Referenced by
Section titled “Referenced by”Reimplements
Section titled “Reimplements”GetParentExplorerInterface
Section titled “GetParentExplorerInterface”virtual const override final
virtual void GetParentExplorerInterface(TScriptInterface< IOperatingSystemExplorerInterface > & OutInterface) const override finalDefined in OperatingSystemDirectory.h:208 Retrieves the parent explorer interface of the operating system directory.
This method retrieves the parent explorer interface of the operating system directory. If the parent directory is valid, it sets the OutInterface parameter to the parent directory interface. If the parent directory is not valid, it sets the OutInterface parameter to the parent partition interface.
Parameters
Section titled “Parameters”OutInterface[out] The output parameter that will be set to the parent explorer interface.
References
Section titled “References”Reimplements
Section titled “Reimplements”IsPartition
Section titled “IsPartition”virtual const inline override final
virtual inline bool IsPartition() const override finalDefined in OperatingSystemDirectory.h:217 Check if the directory is a partition. This method checks whether the directory is a partition or not.
Returns
Section titled “Returns”Returns true always.
Reimplements
Section titled “Reimplements”GetInterfaceDisplayName
Section titled “GetInterfaceDisplayName”virtual const inline override final
virtual inline FText GetInterfaceDisplayName() const override finalDefined in OperatingSystemDirectory.h:226 Returns the display name of the interface. This method returns the display name of the interface as a FText object. The display name is a textual representation of the interface.
Returns
Section titled “Returns”The FText object representing the display name of the interface.
Reimplements
Section titled “Reimplements”FindDirectoryByTag
Section titled “FindDirectoryByTag”virtual const override final
virtual bool FindDirectoryByTag(const FGameplayTag DirectoryTag, const bool bRecursive, UOperatingSystemDirectory *& OutDirectory) const override finalDefined in OperatingSystemDirectory.h:238 Finds a directory by tag. This method searches for a directory with the specified tag within the current directory and, optionally, within its child directories recursively.
Parameters
Section titled “Parameters”-
DirectoryTagThe tag of the directory to find. -
bRecursiveWhether to search the child directories recursively. -
OutDirectoryA pointer to the found directory. It will be set to nullptr if no directory with the specified tag is found.
Returns
Section titled “Returns”True if a directory with the specified tag is found, false otherwise.
References
Section titled “References”Reimplements
Section titled “Reimplements”GetChildDirectory
Section titled “GetChildDirectory”virtual const override final
virtual TScriptInterface< IOperatingSystemExplorerInterface > GetChildDirectory(const FString & TargetChildDirectoryName, const bool bRecursive = true) const override finalDefined in OperatingSystemDirectory.h:253 Retrieves a child directory with the specified name. This method searches for a child directory with the given name in the current directory. If the child directory is found, it is returned.
Parameters
Section titled “Parameters”-
TargetChildDirectoryNameThe name of the child directory to retrieve. -
bRecursiveOptional boolean parameter that specifies whether to search for the child directory recursively in all descendant directories. If set to true, the method will first check the immediate child directories of the current directory, and then recursively search in their child directories as well. If set to false, the method will only check the immediate child directories of the current directory. The default value is true.
Returns
Section titled “Returns”A pointer to the child directory if found, nullptr otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”Reimplements
Section titled “Reimplements”GetAllFiles
Section titled “GetAllFiles”virtual const override final
virtual TArray< UOperatingSystemFile * > GetAllFiles(const FString & WithExtension = "*") const override finalDefined in OperatingSystemDirectory.h:262 GetAllFiles is a method that returns an array of operating system files in the directory.
Parameters
Section titled “Parameters”WithExtensionThe extension of files to filter. Defaults to ”*”.
Returns
Section titled “Returns”An array of UOperatingSystemFile pointers that match the specified extension. If WithExtension is ”*”, ”.” or empty, all files are returned.
References
Section titled “References”Reimplements
Section titled “Reimplements”CanCreateNewFile
Section titled “CanCreateNewFile”virtual const inline override final
virtual inline bool CanCreateNewFile() const override finalDefined in OperatingSystemDirectory.h:269 Determines whether the operating system directory can create a new file.
Returns
Section titled “Returns”true if the operating system directory can create a new file, false otherwise.
Reimplements
Section titled “Reimplements”HasEnoughSpace
Section titled “HasEnoughSpace”virtual const override final
virtual bool HasEnoughSpace(const FOperatingSystemSizeInMB & TestSpace) const override finalDefined in OperatingSystemDirectory.h:277 Determines if the operating system directory has enough space to hold a given amount of data.
Parameters
Section titled “Parameters”TestSpaceThe size of the data to be tested for space.
Returns
Section titled “Returns”True if the directory has enough space, false otherwise.
References
Section titled “References”Reimplements
Section titled “Reimplements”GetOperatingSystem
Section titled “GetOperatingSystem”virtual const override final
virtual UOperatingSystem * GetOperatingSystem() const override finalDefined in OperatingSystemDirectory.h:284 Returns the operating system object associated with the directory.
Returns
Section titled “Returns”A pointer to the UOperatingSystem object.
References
Section titled “References”Reimplements
Section titled “Reimplements”GetFullPath
Section titled “GetFullPath”virtual const override final
virtual TOptional< FString > GetFullPath() const override finalDefined in OperatingSystemDirectory.h:292 Retrieves the full path of the operating system directory. This method returns the full path of the operating system directory by traversing through its parent directories and concatenating the directory names.
Returns
Section titled “Returns”The full path of the operating system directory as a string, or an empty optional if the path could not be retrieved.
Referenced by
Section titled “Referenced by”References
Section titled “References”Reimplements
Section titled “Reimplements”GetInterfaceFromPath
Section titled “GetInterfaceFromPath”virtual const override final
virtual TScriptInterface< IOperatingSystemExplorerInterface > GetInterfaceFromPath(const FString & NewPath) const override finalDefined in OperatingSystemDirectory.h:301 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>.
References
Section titled “References”Reimplements
Section titled “Reimplements”IsUnixRootDirectory
Section titled “IsUnixRootDirectory”virtual const inline
virtual inline bool IsUnixRootDirectory() constDefined in OperatingSystemDirectory.h:305 DO NOT MODIFY THIS!
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”LoadFiles
Section titled “LoadFiles”void LoadFiles(const FOperatingSystemDirectoriesSaveLoad & DirectoriesSaveLoad)Defined in OperatingSystemDirectory.h:348 Load the files from the provided FOperatingSystemDirectoriesSaveLoad object. This method creates UOperatingSystemFile objects for each file specified in the SaveLoad_Files array of the FOperatingSystemDirectoriesSaveLoad object and adds them to the Files array of the UOperatingSystemDirectory object. It also checks if there are any newly added file classes in the FileClasses array of the UOperatingSystemDirectory object, and creates UOperatingSystemFile objects for each newly added file class, if necessary.
Parameters
Section titled “Parameters”DirectoriesSaveLoadThe FOperatingSystemDirectoriesSaveLoad object containing the files to be loaded. This object should have the SaveLoad_Files array populated with information of the files to be loaded. Each element of the SaveLoad_Files array should contain a ClassPath specifying the class of the file to be created. The ClassPath should be a valid TSoftClassPtr<UOperatingSystemFile> pointing to a UOperatingSystemFile subclass.
If the UOperatingSystemDirectory object already has UOperatingSystemFile objects in the Files array with the same file as specified in the FOperatingSystemDirectoriesSaveLoad object, they will be skipped and not re-created.
See also: UOperatingSystemDirectory, FOperatingSystemDirectoriesSaveLoad, UOperatingSystemFile
References
Section titled “References”GetDirectoryPath
Section titled “GetDirectoryPath”const
FString GetDirectoryPath() constDefined in OperatingSystemDirectory.h:351 Same as GetFullPath except this removes the directory name from the path.
Referenced by
Section titled “Referenced by”References
Section titled “References”GetSaveData
Section titled “GetSaveData”const
void GetSaveData(TArray< FOperatingSystemDirectoriesSaveLoad > & OutSaveData) constDefined in OperatingSystemDirectory.h:364 Retrieves the save data for the operating system directories.
This method populates the provided array with the save data for the operating system directories. Each directory’s save data includes the path, name, and class information, as well as the save data for its child files.
Parameters
Section titled “Parameters”OutSaveDataThe array to populate with the save data for the operating system directories. Each element of the array represents the save data for a directory. The save data includes the path, name, class information, and save data for its child files. The array is appended with the save data for all directories and their child directories recursively.
References
Section titled “References”CheckForDirectoryWithTag
Section titled “CheckForDirectoryWithTag”const
bool CheckForDirectoryWithTag(const FGameplayTag & TestTag, const bool bRecursive) constDefined in OperatingSystemDirectory.h:373 Check if the directory has a specific tag.
Parameters
Section titled “Parameters”-
TestTagThe tag to check against. -
bRecursiveWhether to check recursively through child directories.
Returns
Section titled “Returns”Returns true if the directory or any of its child directories have the specified tag, false otherwise.
References
Section titled “References”CanCreateNewFolder
Section titled “CanCreateNewFolder”const inline
inline bool CanCreateNewFolder() constDefined in OperatingSystemDirectory.h:383 Checks if the user has permission to create a new folder.
This method returns a boolean value indicating whether the user has permission to create a new folder in the operating system directory.
Returns
Section titled “Returns”True if the user has permission to create a new folder, false otherwise.
CanRename
Section titled “CanRename”const inline
inline bool CanRename() constDefined in OperatingSystemDirectory.h:390 Checks if the directory can be renamed.
Returns
Section titled “Returns”true if the directory can be renamed, false otherwise.
GetDirectoryTag
Section titled “GetDirectoryTag”const inline
inline FGameplayTag GetDirectoryTag() constDefined in OperatingSystemDirectory.h:399 Retrieves the directory tag.
This method returns the gameplay tag associated with the directory.
Returns
Section titled “Returns”The gameplay tag associated with the directory.
const inline
template<class T> inline T * GetAs() constDefined in OperatingSystemDirectory.h:412 Returns a pointer to the current object casted to the specified type. The specified type, T, must be derived from the UOperatingSystemDirectory class.
Parameters
Section titled “Parameters”TThe type to cast the current object to.
Returns
Section titled “Returns”A pointer to the current object casted to the specified type, or nullptr if the cast fails.
T parameter must be derived from UOperatingSystemDirectory. If not, compile will fail.
GetAsConst
Section titled “GetAsConst”const inline
template<class T> inline const T * GetAsConst() constDefined in OperatingSystemDirectory.h:422 Returns a pointer to the current object casted to the specified type. The specified type, T, must be derived from the UOperatingSystemDirectory class.
Parameters
Section titled “Parameters”TThe type to cast the current object to.
Returns
Section titled “Returns”A pointer to the current object casted to the specified type, or nullptr if the cast fails.
T parameter must be derived from UOperatingSystemDirectory. If not, compile will fail. This returns a const object.
GetChildDirectory
Section titled “GetChildDirectory”virtual const inline
template<class T> virtual inline T * GetChildDirectory(const FString & TargetChildDirectoryName, const bool bRecursive = true) constDefined in OperatingSystemDirectory.h:440 Retrieves a child directory with the given name.
This method returns a pointer to a child directory within the current directory with the specified name. The child directory is represented by an object of type T, which must be derived from UOperatingSystemDirectory. The method performs a static assertion to ensure that T is derived from UOperatingSystemDirectory.
Parameters
Section titled “Parameters”-
TargetChildDirectoryNameThe name of the child directory to retrieve. -
bRecursive(optional) Determines whether the method should recursively search for the child directory within subdirectories. The default value is true.
Returns
Section titled “Returns”A pointer to the child directory object, or nullptr if the child directory is not found or if T is not derived from UOperatingSystemDirectory.
T parameter must be derived from UOperatingSystemDirectory. If not, compile will fail.
Reimplements
Section titled “Reimplements”Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemDirectory * | CreateDirectory static | Creates a new directory. |
T * | CreateDirectory static inline | Creates a new directory of type T in the operating system. |
CreateDirectory
Section titled “CreateDirectory”static
static UOperatingSystemDirectory * CreateDirectory(const TWeakObjectPtr< UOperatingSystemPartition > OwningPartition, const TWeakObjectPtr< UOperatingSystemDirectory > OwningDirectory, const TWeakObjectPtr< UOperatingSystem > OwningOS, const TSoftClassPtr< UOperatingSystemDirectory > & DirectoryClass, const bool bIsFromSaveGame, FGenericError & OutError)Defined in OperatingSystemDirectory.h:127 Creates a new directory.
Parameters
Section titled “Parameters”-
OwningPartitionThe owning partition that the directory belongs to. -
OwningDirectoryThe parent directory that the directory belongs to. -
OwningOSThe operating system that the directory belongs to. -
DirectoryClassThe class of the directory. -
bIsFromSaveGameIndicates if the directory is from a saved game. -
OutErrorError message in case of failure.
Returns
Section titled “Returns”The created directory if successful, nullptr otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”ChildDirectoriesChildDirectoryCollectionCreateDirectoryCreateFileFileClassesFilesGetFullPathInternal_ValidateIsValidNameNEW_SOFT_OBJOperatingSystemOS_CLOG_WARNOS_LOG_VERY_VERBOSEOS_LOG_WARNParentDirectoryParentOSParentPartitionReset
CreateDirectory
Section titled “CreateDirectory”static inline
template<class T> static inline T * CreateDirectory(const TWeakObjectPtr< UOperatingSystemPartition > OwningPartition, const TWeakObjectPtr< UOperatingSystemDirectory > OwningDirectory, const TWeakObjectPtr< UOperatingSystem > OwningOS, const TSoftClassPtr< UOperatingSystemDirectory > & DirectoryClass, const bool bIsFromSaveGame, FGenericError & OutError)Defined in OperatingSystemDirectory.h:154 Creates a new directory of type T in the operating system.
Parameters
Section titled “Parameters”TThe type of directory to create. It must be derived from UOperatingSystemDirectory.
Parameters
Section titled “Parameters”-
OwningPartitionThe owning partition of the directory. -
OwningDirectoryThe parent directory of the directory being created. -
OwningOSThe operating system object that the directory will belong to. -
DirectoryClassThe class of the directory to create. -
bIsFromSaveGameFlag indicating if the directory is being created from a save game. -
OutErrorThe error encountered during the creation process, if any.
Returns
Section titled “Returns”A pointer to the newly created directory of type T, or nullptr if the creation failed.
Compile will fail if the T parameter is not derived from UOperatingSystemDirectory.
See also: UOperatingSystemPartition
See also: UOperatingSystemDirectory
See also: UOperatingSystem
Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
FText | Name | The Name variable represents the name of a specific operating system directory. |
FGameplayTag | Tag | Indicates a certain tag for this directory. |
TSoftObjectPtr< UObject > | OverrideIcon | The icon to be used as an override for the default icon. |
uint8 | bCanCreateNewFolder | Boolean variable indicating whether a new folder can be created in the operating system directory. |
uint8 | bCanCreateNewFile | Flag indicating whether the user is allowed to create new files in the operating system directory. If this flag is set to 1, the user can create new files; otherwise, the user is not allowed to create new files. |
uint8 | bIsHidden | Indicates whether the file or directory is hidden. |
TSet< TSoftClassPtr< UOperatingSystemFile > > | FileClasses | Set of file classes representing files in the operating system directory. |
TSoftObjectPtr< UOperatingSystemDirectoriesCollection > | ChildDirectoryCollection | Stores a collection of child directories in this directory. |
TWeakObjectPtr< UOperatingSystemDirectory > | ParentDirectory | Represents the parent directory that owns this directory. |
TWeakObjectPtr< UOperatingSystemPartition > | ParentPartition | A weak object pointer to a UOperatingSystemPartition object representing the parent partition. |
TArray< TObjectPtr< UOperatingSystemFile > > | Files | Holds an array of UOperatingSystemFile’s that belongs to this directory. |
TArray< TObjectPtr< UOperatingSystemDirectory > > | ChildDirectories | All the child directories that belongs to this directory. |
TWeakObjectPtr< UOperatingSystem > | ParentOS | The operating system that owns this directory. |
FText NameDefined in OperatingSystemDirectory.h:33 The Name variable represents the name of a specific operating system directory.
Referenced by
Section titled “Referenced by”CreateDirectoryGetDirectoryNameGetFullPathInternal_ValidateUOperatingSystemDir_DesktopUOperatingSystemDir_DocumentsUOperatingSystemDir_DownloadsUOperatingSystemDir_MusicUOperatingSystemDir_PicturesUOperatingSystemDir_UsersUOperatingSystemDir_Videos
FGameplayTag TagDefined in OperatingSystemDirectory.h:39 Indicates a certain tag for this directory.
Referenced by
Section titled “Referenced by”CheckForDirectoryWithTagFindDirectoryByTagGetDirectoryIconObjectGetDirectoryNameInternal_ValidateIsSystemDirectoryUOperatingSystemDir_DesktopUOperatingSystemDir_DocumentsUOperatingSystemDir_DownloadsUOperatingSystemDir_MusicUOperatingSystemDir_PicturesUOperatingSystemDir_UsersUOperatingSystemDir_Videos
OverrideIcon
Section titled “OverrideIcon”TSoftObjectPtr< UObject > OverrideIconDefined in OperatingSystemDirectory.h:45 The icon to be used as an override for the default icon.
Referenced by
Section titled “Referenced by”bCanCreateNewFolder
Section titled “bCanCreateNewFolder”uint8 bCanCreateNewFolderDefined in OperatingSystemDirectory.h:56 Boolean variable indicating whether a new folder can be created in the operating system directory.
If this variable is set to true, it means that the user has permission to create a new folder in the operating system directory specified by the application. If it is set to false, the user does not have permission to create a new folder in the directory.
bCanCreateNewFile
Section titled “bCanCreateNewFile”uint8 bCanCreateNewFileDefined in OperatingSystemDirectory.h:63 Flag indicating whether the user is allowed to create new files in the operating system directory. If this flag is set to 1, the user can create new files; otherwise, the user is not allowed to create new files.
bIsHidden
Section titled “bIsHidden”uint8 bIsHiddenDefined in OperatingSystemDirectory.h:72 Indicates whether the file or directory is hidden.
This variable represents a boolean flag indicating whether a file or directory is hidden in the operating system. A value of 1 indicates that the item is hidden, while a value of 0 indicates that the item is not hidden.
FileClasses
Section titled “FileClasses”TSet< TSoftClassPtr< UOperatingSystemFile > > FileClassesDefined in OperatingSystemDirectory.h:78 Set of file classes representing files in the operating system directory.
Referenced by
Section titled “Referenced by”ChildDirectoryCollection
Section titled “ChildDirectoryCollection”TSoftObjectPtr< UOperatingSystemDirectoriesCollection > ChildDirectoryCollectionDefined in OperatingSystemDirectory.h:84 Stores a collection of child directories in this directory.
Referenced by
Section titled “Referenced by”ParentDirectory
Section titled “ParentDirectory”TWeakObjectPtr< UOperatingSystemDirectory > ParentDirectoryDefined in OperatingSystemDirectory.h:90 Represents the parent directory that owns this directory.
Referenced by
Section titled “Referenced by”ParentPartition
Section titled “ParentPartition”TWeakObjectPtr< UOperatingSystemPartition > ParentPartitionDefined in OperatingSystemDirectory.h:96 A weak object pointer to a UOperatingSystemPartition object representing the parent partition.
Referenced by
Section titled “Referenced by”CreateDirectoryGetFullPathGetParentExplorerInterfaceHasEnoughSpaceInternal_GetDirectoryFromPathNonUnix
TArray< TObjectPtr< UOperatingSystemFile > > FilesDefined in OperatingSystemDirectory.h:102 Holds an array of UOperatingSystemFile’s that belongs to this directory.
Referenced by
Section titled “Referenced by”ChildDirectories
Section titled “ChildDirectories”TArray< TObjectPtr< UOperatingSystemDirectory > > ChildDirectoriesDefined in OperatingSystemDirectory.h:106 All the child directories that belongs to this directory.
Referenced by
Section titled “Referenced by”ParentOS
Section titled “ParentOS”TWeakObjectPtr< UOperatingSystem > ParentOSDefined in OperatingSystemDirectory.h:110 The operating system that owns this directory.
Referenced by
Section titled “Referenced by”CreateDirectoryGetDirectoryIconObjectGetDirectoryPathGetFullPathGetInterfaceFromPathGetOperatingSystemHasEnoughSpaceInternal_GetDirectoryFromPathNonUnixInternal_Validate
Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
void | OnValidate virtual inline | This method is called to perform custom validation for the operating system directory. |
OnValidate
Section titled “OnValidate”virtual inline
virtual inline void OnValidate(FGenericError & OutError)Defined in OperatingSystemDirectory.h:328 This method is called to perform custom validation for the operating system directory.
This method can be overridden in derived classes to perform custom validation logic. It is called during the process of validating the operating system directory.
Parameters
Section titled “Parameters”OutErrorA reference to a FGenericError object which can be used to report any validation errors encountered.
See also: FGenericError
Referenced by
Section titled “Referenced by”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
void | Internal_Validate | |
TScriptInterface< IOperatingSystemExplorerInterface > | Internal_GetDirectoryFromPathUnix const | |
TScriptInterface< IOperatingSystemExplorerInterface > | Internal_GetDirectoryFromPathNonUnix const |
Internal_Validate
Section titled “Internal_Validate”void Internal_Validate(FGenericError & OutError)Defined in OperatingSystemDirectory.h:309
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetDirectoryFromPathUnix
Section titled “Internal_GetDirectoryFromPathUnix”const
TScriptInterface< IOperatingSystemExplorerInterface > Internal_GetDirectoryFromPathUnix(const FString & NewPath) constDefined in OperatingSystemDirectory.h:311
Referenced by
Section titled “Referenced by”Internal_GetDirectoryFromPathNonUnix
Section titled “Internal_GetDirectoryFromPathNonUnix”const
TScriptInterface< IOperatingSystemExplorerInterface > Internal_GetDirectoryFromPathNonUnix(const FString & NewPath) constDefined in OperatingSystemDirectory.h:312