 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.io;
29 import org.jetbrains.annotations.NotNull;
90 if (canonicalFile.startsWith(canonicalMapsDir)) {
92 mapPath = canonicalFile.substring(canonicalMapsDir.length());
93 baseDir = mapsDirectory;
96 mapPath = canonicalFile;
97 final boolean isWindows = System.getProperty(
"os.name").contains(
"Windows");
98 baseDir = (isWindows) ?
new File(
"//./") :
new File(
"/");
A MapPath that is absolute, that is, it starts with a "/".
Base package of all Gridarta classes.
This class contains methods for converting relative map paths to absolute map paths and vice versa.
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
Utility class for MapPath related functions.
MapFile getMapFile(@NotNull final File file)
Returns a MapFile instance for a File.
static String getMapPath(@NotNull final File file, @NotNull final File baseDir)
Returns a relative path path for a File.
String getMapPath(@NotNull final File file)
Returns a map path for a File.
MapFile getMapFile(@NotNull final AbsoluteMapPath mapPath)
Returns a MapFile instance from an AbsoluteMapPath.
final ProjectSettings projectSettings
The ProjectSettings instance for obtaining folder information.
PathManager(@NotNull final ProjectSettings projectSettings)
Creates a new instance.
Utility class for converting relative map paths to absolute map paths and vice versa.
The location of a map file with a map directory.
Settings that apply to a project.
Utility-class for Gridarta's I/O.
File getMapsDirectory()
Returns the default maps directory.
static String getCanonicalPath(@NotNull final File file)
Calls File#getCanonicalPath().