Package org.teiid.file
Interface VirtualFileConnection
-
- All Superinterfaces:
Connection
- All Known Implementing Classes:
FileConnectionImpl
,FtpFileConnection
,FtpFileConnectionImpl
,HdfsConnection
,S3Connection
public interface VirtualFileConnection extends Connection
Simple interface for the filesystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VirtualFileConnection.FileMetadata
static class
VirtualFileConnection.Util
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
add(InputStream in, String path)
Add a filedefault void
add(InputStream in, String path, VirtualFileConnection.FileMetadata fileMetadata)
Add a filedefault boolean
areFilesUsableAfterClose()
VirtualFile[]
getFiles(String namePattern)
Return a list of files by a given file patternboolean
remove(String path)
Remove a file-
Methods inherited from interface org.teiid.resource.api.Connection
close
-
-
-
-
Method Detail
-
getFiles
VirtualFile[] getFiles(String namePattern) throws TranslatorException
Return a list of files by a given file pattern- Parameters:
namePattern
- - the syntax and pattern. The wildcard character * is supported in the filename only.- Returns:
- Throws:
TranslatorException
-
add
default void add(InputStream in, String path, VirtualFileConnection.FileMetadata fileMetadata) throws TranslatorException
Add a file- Parameters:
fileMetadata
- Additional metadata about the file to be created. May not be used/supported by all file sources.- Throws:
TranslatorException
-
add
void add(InputStream in, String path) throws TranslatorException
Add a file- Throws:
TranslatorException
-
remove
boolean remove(String path) throws TranslatorException
Remove a file- Parameters:
path
-- Returns:
- Throws:
TranslatorException
-
areFilesUsableAfterClose
default boolean areFilesUsableAfterClose()
-
-