Package org.confng.util
Class FileResolver.ResolvedFile
- java.lang.Object
-
- org.confng.util.FileResolver.ResolvedFile
-
- Enclosing class:
- FileResolver
public static class FileResolver.ResolvedFile extends Object
Result of file resolution containing the resolved path and metadata.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Checks if the file exists (either in filesystem or classpath).StringgetFileName()Gets the original filename (without path).PathgetPath()Gets the resolved path that can be used for reading the file.booleanisFromClasspath()Checks if the file was found in the classpath.booleanisFromFilesystem()Checks if the file was found in the filesystem.
-
-
-
Method Detail
-
getPath
public Path getPath()
Gets the resolved path that can be used for reading the file. For JAR resources, this will be a temporary file.- Returns:
- the resolved path
-
getFileName
public String getFileName()
Gets the original filename (without path).- Returns:
- the filename
-
exists
public boolean exists()
Checks if the file exists (either in filesystem or classpath).- Returns:
- true if the file exists
-
isFromFilesystem
public boolean isFromFilesystem()
Checks if the file was found in the filesystem.- Returns:
- true if found in filesystem
-
isFromClasspath
public boolean isFromClasspath()
Checks if the file was found in the classpath.- Returns:
- true if found in classpath
-
-