Package com.tccc.kos.commons.core.vfs
Interface VFSSource
- All Known Implementing Classes:
AbstractVFSSource,FilesystemVFSSource,KabVFSSource,LocalizationContext,PathRewritingVFSSource,ProxyVFSSource,StackedVFSSource,VFS
public interface VFSSource
Interface for returning in input stream for a given path. Allows anything
with path lookup semantics to be mounted in the VFS.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the base path of this source.default JsonViewWrapperReturn details for the json view.default StringgetFullPath(String path) Returns the full path of a source relative path.getInputStream(String path) Returns an input stream for the specified path.Gets the parent.booleanReturn true if the source is enabled.default voidCalled when the source is unmounted.voidSets the parent.
-
Method Details
-
getParent
VFSParent getParent()Gets the parent.- Returns:
- the parent
-
setParent
Sets the parent. -
getInputStream
Returns an input stream for the specified path.- Parameters:
path- the requested path- Returns:
- the input stream or null if not found
-
isEnabled
boolean isEnabled()Return true if the source is enabled. Disabled sources will not be accessible. -
getBasePath
Returns the base path of this source. -
getDetails
Return details for the json view. -
getFullPath
Returns the full path of a source relative path.- Parameters:
path- the source relative path
-
onUnmount
Called when the source is unmounted.- Parameters:
path- the mount point
-