Package com.kosdev.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
- Version:
- 1
-
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.- Since:
- 1
-
getInputStream
Returns an input stream for the specified path.- Parameters:
path- the requested path- Returns:
- the input stream or null if not found
- Since:
- 1
-
isEnabled
boolean isEnabled()Return true if the source is enabled. Disabled sources will not be accessible.- Since:
- 1
-
getBasePath
Returns the base path of this source.- Since:
- 1
-
getDetails
Return details for the json view.- Since:
- 1
-
getFullPath
Returns the full path of a source relative path.- Parameters:
path- the source relative path- Since:
- 1
-
onUnmount
Called when the source is unmounted.- Parameters:
path- the mount point- Since:
- 1
-