Package com.tccc.kos.commons.core.vfs
Class StackedVFSSource
java.lang.Object
com.tccc.kos.commons.core.vfs.AbstractVFSSource
com.tccc.kos.commons.core.vfs.StackedVFSSource
Implementation of VFSSource that supports stacked sources. This source can be
mounted but then sources can be added and removed from this source as a
priority order stack.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBasePath
(VFSSource source) Returns the base path to the specified VFSSource.getInputStream
(String path) Retrieves the input stream for the given path.void
Pushes a new source as the top overlay.void
Removes the specified source from the list.Methods inherited from class com.tccc.kos.commons.core.vfs.AbstractVFSSource
getParent, isEnabled, setEnabled, setParent
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.vfs.VFSSource
getBasePath, getDetails, getFullPath, onUnmount
-
Constructor Details
-
StackedVFSSource
public StackedVFSSource()Constructs a new instance.
-
-
Method Details
-
getInputStream
Retrieves the input stream for the given path.- Specified by:
getInputStream
in interfaceVFSSource
- Parameters:
path
- the requested path- Returns:
- the input stream
-
push
Pushes a new source as the top overlay.- Parameters:
source
- the source to put at the top of the list
-
remove
Removes the specified source from the list.- Parameters:
source
- the source to remove
-
getBasePath
Returns the base path to the specified VFSSource.- Specified by:
getBasePath
in interfaceVFSParent
- Parameters:
source
- the source to return the base path for- Returns:
- the base path to the source
-