Package org.eclipse.epsilon.egl.util
Class FileUtil
java.lang.Object
org.eclipse.epsilon.egl.util.FileUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
readIfExists
(File file) static String
Returns the absolute path for the given path.static void
static void
static void
static void
-
Field Details
-
FILE_SEP
-
NEWLINE
-
ESCAPED_NEWLINE
-
-
Method Details
-
resolve
Returns the absolute path for the given path. The given path may be relative, in which case it is resolved usingparent
as its parent path. Ifparent
isnull
, the path is resolved using the default relative path (typically the directory from which the JVM was launched).- Parameters:
path
- a relative or absolute path.parent
- the parent directory to use when resolving a relative path.- Returns:
- The absolute path for the given path.
- Throws:
NullPointerException
- whenpath
isnull
-
readIfExists
- Returns:
- null if the file doesn't exist
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-