package project_file_system
Constants
DatabaseFolder
"database"
ContentFolder
"database/content"
ContentConfigFolder
"database/config"
SrcFolder
"database/src"
StockFolder
"database/stock"
ProjectConfigFile
"database/project.json"
SrcFontFolder
SrcFolder + "/font"
SrcCharsetFolder
SrcFolder + "/font/charset"
SrcPluginFolder
SrcFolder + "/plugin"
SrcRenderFolder
SrcFolder + "/render"
SrcShaderFolder
SrcFolder + "/render/shader"
ContentAudioFolder
"audio"
ContentMusicFolder
"audio/music"
ContentSoundFolder
"audio/sound"
ContentFontFolder
"font"
ContentMeshFolder
"mesh"
ContentRenderFolder
"render"
ContentMaterialFolder
"render/material"
ContentRenderPassFolder
"render/renderpass"
ContentShaderFolder
"render/shader"
ContentShaderPipelineFolder
"render/pipeline"
ContentSpvFolder
"render/spv"
ContentStageFolder
"stage"
ContentTextureFolder
"texture"
ContentUiFolder
"ui"
ContentHtmlFolder
"ui/html"
ContentCssFolder
"ui/css"
KaijuSrcFolder
"kaiju"
ProjectCodeFolder
"src"
ProjectFileTemplates
KaijuSrcFolder + "/file_templates"
ProjectCodeGameHostFolder
ProjectCodeFolder + "/game_host"
ProjectBuildFolder
"build"
ProjectBuildAndroidFolder
ProjectBuildFolder + "/android"
ProjectVSCodeFolder
".vscode"
ProjectLaunchJsonFile
".vscode/launch.json"
ProjectCodeMain
ProjectCodeGame
ProjectModFile
ProjectCodeGameHost
ProjectCodeGameHostFolder + "/game_host
ProjectWorkFile
"go.work"
ProjectCodeGameTitle
KaijuSrcFolder + "/build/title
EntityDataBindingInit
ProjectCodeFolder + "/entity_data_binding_init
Types
EngineFileSystem
struct
var EngineFS EngineFileSystem
EngineFileSystem.CopyFolder
FileSystem
struct
FileSystem is the rooted project folder that is responsible for accessing any files or folders within the project. The type is a composition of os.Root, so all functions availabe to that structure are available to this one. Helper functions specific to projects are extended to it's behavior.
The FileSystem has no awareness of actual content/assets and simply understands the structure for the project and allows raw read/write access to the files within the project.
New
New creates a new FileSystem that is rooted to the given project path. This function does not care about the status of the given path and only expects that the path supplied is to a folder on the filesystem. If the supplied path does not exist, an attempt will be made to create the folder.
FileSystem.EnsureDatabaseExists
Used to review the loaded FileSystem to ensure that the primary folders required for this rooted FileSystem are present to be considered a project. This will return an error if the core files are missing. Please review the source code file for this function to review the required core files and folders used, they are set as local package variables.
FileSystem.Exists
Exists will return true if the target file or folder exists in the rooted file system
FileSystem.FileExists
FileExists will return true if the file exists in the rooted file system
FileSystem.FolderExists
FolderExists will return true if the folder exists in the rooted file system
FileSystem.FullPath
FullPath will return the a cleaned version of the rooted file system path with the supplied name joined onto it.
FileSystem.IsValid
IsValid will return true if this project file system has been setup already.
FileSystem.NormalizePath
NormalizePath will attempt to determine if the input path is a location held within the project file system. If it is a path within this file systme, then it will return the path as a relative path to the system, otherwise it will return the path supplied.
FileSystem.ReadDir
ReadDir is a wrapper around os.ReadDir since os.Root doesn't provide an interface to this function directly. This simply grabs the rooted directory path and joins the name argument to it before forwarding to os.ReadDir.
FileSystem.ReadModName
FileSystem.SetupStructure
SetupStructure goes through and ensure all the base folders are created for the project. This will only create the folders if they do not yet exist. Folders are often missing if pulling the project from version control, as empty folders are not typically submitted. For more information on folder structure layout, please review the high level editor design documentation in the README.
FileSystem.TryUpgrade
FileSystem.WriteDataBindingRegistryInit
PathError
struct