package asset_info
Constants
InfoExtension
".adi"
ProjectCache
".cache"
Variables
ErrNoInfo
errors.New("asset database does not have info for this file")
Functions
Exists
Exists checks to see if a given path has a generated ADI file the file it searches for will be path/to/file.ext.adi
ID
ID returns the ID of the asset within it's ADI file, if the ADI file is not found, the read error is returned
InitForCurrentProject
Move
Write
Types
AssetDatabaseInfo
struct
type AssetDatabaseInfo struct {
ID string
Path string
Type string
ParentID string
Children []AssetDatabaseInfo
Metadata map[string]string
}
Lookup
New
Read
Read will read the ADI file for the given path and return the AssetDatabaseInfo struct. Possible errors are:
- ErrNoInfo: if the file does not exist
- json.Unmarshal error: if the file is corrupted
- filesystem.ReadTextFile error: if the file cannot be read