Class ProjectResource
- java.lang.Object
-
- org.godot.utilities.core.io.FileResource
-
- org.godot.utilities.project.resources.ProjectResource
-
- All Implemented Interfaces:
IResource
- Direct Known Subclasses:
Scene
public class ProjectResource extends FileResource
-
-
Field Summary
Fields Modifier and Type Field Description protected InicontentFileContent filebooleanisDisplayableCheck if file is displayable (only pictures with specific formats)booleanisReadableCheck if file is readable (only files with .ini syntax)ResourceTyperesourceTypeCurrent resource typeVersionversionProject version-
Fields inherited from class org.godot.utilities.core.io.FileResource
location
-
-
Constructor Summary
Constructors Constructor Description ProjectResource(@NotNull Path l, @NotNull Version v)ProjectResource constructor.ProjectResource(@NotNull Path l, @NotNull Project p)ProjectResource constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InigetFileContent()Get file content only if current file is readable.@NotNull StringtoString()Object string representationvoidupdateContent()The same behavior ofgetFileContent()but this method return nothing.-
Methods inherited from class org.godot.utilities.core.io.FileResource
getExtension, getResourcePath
-
-
-
-
Field Detail
-
version
public final Version version
Project version
-
isReadable
public final boolean isReadable
Check if file is readable (only files with .ini syntax)
-
isDisplayable
public final boolean isDisplayable
Check if file is displayable (only pictures with specific formats)
-
resourceType
public final ResourceType resourceType
Current resource type
-
contentFile
protected Ini contentFile
Content file
-
-
Method Detail
-
getFileContent
public Ini getFileContent() throws IOException
Get file content only if current file is readable.- Returns:
- Return an ini file with all content in INI format.
- Throws:
UnsupportedOperationException- Error if operation is not supportedIOException- Error if file not exists or is not a valid file
-
updateContent
public void updateContent() throws IOExceptionThe same behavior ofgetFileContent()but this method return nothing.- Throws:
UnsupportedOperationException- Error if operation is not supportedIOException- Error if file not exists or is not a valid file
-
toString
@NotNull public @NotNull String toString()
Object string representation- Overrides:
toStringin classFileResource- Returns:
- Object string representation
-
-