Package org.pentaho.di.core.vfs
Interface IKettleVFS
- All Known Implementing Classes:
KettleVFSImpl
public interface IKettleVFS
An interface to a bowl-specific KettleVFS interface. Most, but not all methods from KettleVFS have been moved to this
interface. Methods that remain are truly static or use state that must remain global. Use
KettleVFS.getInstance( Bowl ) to get an instance.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.vfs2.FileObject
createTempFile
(String prefix, String suffix, String directory) org.apache.commons.vfs2.FileObject
createTempFile
(String prefix, String suffix, String directory, VariableSpace space) org.apache.commons.vfs2.FileObject
createTempFile
(String prefix, KettleVFS.Suffix suffix) Creates a file using "java.io.tmpdir" directoryorg.apache.commons.vfs2.FileObject
createTempFile
(String prefix, KettleVFS.Suffix suffix, String directory) org.apache.commons.vfs2.FileObject
createTempFile
(String prefix, KettleVFS.Suffix suffix, String directory, VariableSpace space) org.apache.commons.vfs2.FileObject
createTempFile
(String prefix, KettleVFS.Suffix suffix, VariableSpace variableSpace) Creates a file using "java.io.tmpdir" directoryboolean
fileExists
(String vfsFilename) boolean
fileExists
(String vfsFilename, VariableSpace space) org.apache.commons.vfs2.FileObject
getFileObject
(String vfsFilename) org.apache.commons.vfs2.FileObject
getFileObject
(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) org.apache.commons.vfs2.FileObject
getFileObject
(String vfsFilename, VariableSpace space) org.apache.commons.vfs2.FileObject
getFileObject
(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) org.apache.commons.vfs2.FileSystemOptions
getFileSystemOptions
(String scheme, String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions) getFriendlyURI
(String filename) getFriendlyURI
(String filename, VariableSpace space) getInputStream
(String vfsFilename) getInputStream
(String vfsFilename, VariableSpace space) getOutputStream
(String vfsFilename, boolean append) getOutputStream
(String vfsFilename, VariableSpace space, boolean append) getOutputStream
(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) getOutputStream
(org.apache.commons.vfs2.FileObject fileObject, boolean append) getTextFileContent
(String vfsFilename, String charSetName) Deprecated.use getInstance( Bowl )getTextFileContent
(String vfsFilename, VariableSpace space, String charSetName) void
reset()
resets the VariableSpaceorg.apache.commons.vfs2.FileName
resolveURI
(String uri) Resolves the given URI to a file name.
-
Method Details
-
getFileObject
- Throws:
KettleFileException
-
getFileObject
org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space) throws KettleFileException - Throws:
KettleFileException
-
getFileObject
org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException - Throws:
KettleFileException
-
getFileObject
org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException - Throws:
KettleFileException
-
resolveURI
Resolves the given URI to a file name.- Parameters:
uri
- The URI to resolve.- Returns:
- A
FileName
that matches the URI; nevernull
. - Throws:
KettleFileException
- if this is not possible.
-
getFileSystemOptions
org.apache.commons.vfs2.FileSystemOptions getFileSystemOptions(String scheme, String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions) throws IOException - Throws:
IOException
-
getFriendlyURI
-
getFriendlyURI
-
getTextFileContent
Deprecated.use getInstance( Bowl )Read a text file (like an XML document). WARNING DO NOT USE FOR DATA FILES.- Parameters:
vfsFilename
- the filename or URL to read fromcharSetName
- the character set of the string (UTF-8, ISO8859-1, etc)- Returns:
- The content of the file as a String
- Throws:
IOException
KettleFileException
-
getTextFileContent
String getTextFileContent(String vfsFilename, VariableSpace space, String charSetName) throws KettleFileException - Throws:
KettleFileException
-
fileExists
- Throws:
KettleFileException
-
fileExists
- Throws:
KettleFileException
-
getInputStream
- Throws:
KettleFileException
-
getInputStream
- Throws:
KettleFileException
-
getOutputStream
OutputStream getOutputStream(org.apache.commons.vfs2.FileObject fileObject, boolean append) throws IOException - Throws:
IOException
-
getOutputStream
- Throws:
KettleFileException
-
getOutputStream
OutputStream getOutputStream(String vfsFilename, VariableSpace space, boolean append) throws KettleFileException - Throws:
KettleFileException
-
getOutputStream
OutputStream getOutputStream(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) throws KettleFileException - Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix) throws KettleFileException Creates a file using "java.io.tmpdir" directory- Parameters:
prefix
- - file nameprefix
- - file extension- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, VariableSpace variableSpace) throws KettleFileException Creates a file using "java.io.tmpdir" directory- Parameters:
prefix
- - file namesuffix
- - file extensionvariableSpace
- is used to get system variables- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory) throws KettleFileException - Parameters:
prefix
- - file namesuffix
- - file extensiondirectory
- - directory where file will be created- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory) throws KettleFileException - Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory, VariableSpace space) throws KettleFileException - Parameters:
prefix
- - file namedirectory
- path to directory where file will be createdspace
- is used to get system variables- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory, VariableSpace space) throws KettleFileException - Throws:
KettleFileException
-
reset
void reset()resets the VariableSpace
-