public interface FileSystem
Modifier and Type | Field and Description |
---|---|
static String |
CLASSPATH_PROTOCOL
Prefix for loading of the classpath
|
static String |
FILE_PROTOCOL
Prefix for loading of a filesystem based on the current directory
|
static String |
FILE_PROTOCOL_ABSOLUTE
Prefix for loading of a filesystem using the absolute path
|
static String |
FILE_PROTOCOL_AND_CONF
Prefix for loading of the config directory
|
static String |
FILE_PROTOCOL_AND_VAR
Prefix for loading of the var directory
|
Modifier and Type | Method and Description |
---|---|
File |
getBasedir()
Return the base folder used by the application
|
File |
getFile(String fileURL)
Used to retrieve a specific file in the application context
|
InputStream |
getResource(String url)
to retrieve a resource.
|
static final String FILE_PROTOCOL
static final String FILE_PROTOCOL_ABSOLUTE
static final String FILE_PROTOCOL_AND_CONF
static final String FILE_PROTOCOL_AND_VAR
static final String CLASSPATH_PROTOCOL
InputStream getResource(String url) throws IOException
url
- the url of the resourceIOException
- if the resource could not be accessedFile getFile(String fileURL) throws FileNotFoundException
fileURL
- fileFileNotFoundException
- if the file cannot be found/readFile getBasedir() throws FileNotFoundException
FileNotFoundException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.