Gridarta Editor
|
Static Public Member Functions | |
static File | findPathFile (@NotNull final String name) throws IOException |
static File | getCanonicalFile (@NotNull final File file) |
static String | getCanonicalPath (@NotNull final File file) |
static File | getFile (@NotNull final File dir, @NotNull final String fileName) throws IOException |
static URL | getResource (@NotNull final File dir, @NotNull final String fileName) throws FileNotFoundException |
Static Public Attributes | |
static final String | MAP_ENCODING = "iso-8859-1" |
Private Member Functions | |
IOUtils () | |
Utility-class for Gridarta's I/O.
Definition at line 40 of file IOUtils.java.
|
private |
Utility class - do not instantiate.
Definition at line 57 of file IOUtils.java.
|
static |
Searches for
on all paths specified by the environment variable "PATH".
name | the file to search for |
IOException | if the file was not found |
Definition at line 163 of file IOUtils.java.
|
static |
Calls File#getCanonicalFile(). If this fails, returns {}. file the file the absolute path
Definition at line 209 of file IOUtils.java.
Referenced by net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.AbstractDefaultProjectSettings(), net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setArchDirectory(), net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setMapsDirectoryInt(), and net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setMediaDirectory().
|
static |
Calls File#getCanonicalPath(). If this fails, returns {}. file the file the absolute path
Definition at line 192 of file IOUtils.java.
Referenced by net.sf.gridarta.model.io.PathManager.getMapFile().
|
static |
Returns a File instance for a resource that is a regular file on the file system. Returns the passed file if it is a regular file. Otherwise copies the passed file into a temporary regular file and returns the copy.
dir | directory to read from |
fileName | file name of file to read |
IOException | if the file does not exist or cannot be copied to the file system |
Definition at line 125 of file IOUtils.java.
References net.sf.gridarta.utils.IOUtils.getResource().
Referenced by net.sf.gridarta.model.configsource.AbstractConfigSource.getFile(), and net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection().
|
static |
Get the URL of a resource.
dir | the directory to read from |
fileName | the file name of the file to read |
FileNotFoundException | in case all tries getting a URL to the file failed |
Definition at line 69 of file IOUtils.java.
Referenced by net.sf.gridarta.utils.IOUtils.getFile(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadAnimations(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimationsFromCollect(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadArchetypes(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadArchetypeTypeSet(), net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadGameObjectMatchers(), net.sf.gridarta.var.crossfire.resource.CollectedResourcesReader.loadSmoothFaces(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadSpecialTreasureLists(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadSpellFile(), net.sf.gridarta.var.daimonin.maincontrol.DefaultEditorFactory.newArchetypeParser(), and net.sf.gridarta.var.atrinik.maincontrol.DefaultEditorFactory.newArchetypeParser().
|
static |
Encoding to use for maps and other data. The encoding given here is used for reading and writing maps. You shouldn't change this only because you use an UTF-8 system or so, since the encoding used here MUST be compatible with the server and the client and the maps. The paragraph sign § is the critical character.
Definition at line 52 of file IOUtils.java.
Referenced by net.sf.gridarta.utils.MapFileFilter.accept(), net.sf.gridarta.model.collectable.SmoothFacesCollectable.collect(), net.sf.gridarta.model.collectable.AbstractArchetypeSetCollectable< GameObject, MapArchObject, Archetype >.collect(), net.sf.gridarta.model.collectable.AnimationObjectsCollectable.collectAnimations(), net.sf.gridarta.model.collectable.AnimationObjectsCollectable.collectAnimTree(), net.sf.gridarta.model.io.DefaultMapReader< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.DefaultMapReader(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.encodeMapFile(), net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getCommand(), net.sf.gridarta.model.smoothface.SmoothFacesLoader.load(), net.sf.gridarta.model.gameobject.MultiPositionData.load(), net.sf.gridarta.model.io.AnimationObjectsReader.loadAnimations(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimationsFromCollect(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimTree(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadArchetypes(), net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.loadArchetypesFromFiles(), net.sf.gridarta.model.artifact.ArtifactParser< net.sf.gridarta.model.gameobject.TestGameObject, net.sf.gridarta.model.maparchobject.TestMapArchObject, net.sf.gridarta.model.archetype.TestArchetype >.loadArtifact(), net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection(), net.sf.gridarta.model.treasurelist.TreasureLoader.loadTreasureList(), net.sf.gridarta.textedit.scripteditor.MenuEntries.MenuEntries(), and net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.parseDefFace().