public interface IPathRelativeIO extends Serializable
IMutablePathRelativeIO.| Modifier and Type | Method and Description |
|---|---|
default boolean |
existsDir(String sRelativePath)
Check if a directory relative to the base path exists
|
default boolean |
existsFile(String sRelativePath)
Check if a file relative to the base path exists
|
default String |
getBasePath() |
File |
getBasePathFile() |
default File |
getFile(String sRelativePath)
Get a
File relative to the base path. |
default InputStream |
getInputStream(String sRelativePath)
Get the
InputStream relative to the base path |
default Reader |
getReader(String sRelativePath,
Charset aCharset)
Get the
Reader relative to the base path |
default String |
getRelativeFilename(File aAbsoluteFile)
Get the relative file name for the passed absolute file.
|
default com.helger.commons.io.resource.FileSystemResource |
getResource(String sRelativePath)
Get the file system resource relative to the base path
|
@Nonnull @Nonempty default String getBasePath()
null nor
empty.@Nonnull default File getFile(@Nonnull String sRelativePath)
File relative to the base path.sRelativePath - the relative pathFile and never null.getBasePathFile()default boolean existsFile(@Nonnull String sRelativePath)
sRelativePath - the relative pathtrue if the File is a file and exists,
false otherwise.getBasePathFile()default boolean existsDir(@Nonnull String sRelativePath)
sRelativePath - the relative pathtrue if the File is a directory and exists,
false otherwise.getBasePathFile()@Nonnull default com.helger.commons.io.resource.FileSystemResource getResource(@Nonnull String sRelativePath)
sRelativePath - the relative pathFileSystemResource and never
null.getBasePathFile()@Nullable default InputStream getInputStream(@Nonnull String sRelativePath)
InputStream relative to the base pathsRelativePath - the relative pathnull if the path does not existgetBasePathFile()@Nullable default Reader getReader(@Nonnull String sRelativePath, @Nonnull Charset aCharset)
Reader relative to the base pathsRelativePath - the relative pathaCharset - The charset to use. May not be null.null if the path does not existgetBasePathFile()Copyright © 2014–2017 Philip Helger. All rights reserved.