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 Stringstatic StringreadIfExists(File file) static StringReturns the absolute path for the given path.static voidstatic voidstatic voidstatic 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 usingparentas its parent path. Ifparentisnull, 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- whenpathisnull
-
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
-