Package com.tccc.kos.commons.core.vfs
Class ProxyVFSSource
java.lang.Object
com.tccc.kos.commons.core.vfs.AbstractVFSSource
com.tccc.kos.commons.core.vfs.ProxyVFSSource
Class that wraps another source. Since a given source can only be mounted once due
to the need to have a single parent, this allows the proxied source to be mounted
in multiple locations at the same time. You cannot call
getFullPath()
on the
proxied source as it has no parent, but you can call it on this proxy and it will
work correctly.- Since:
- 1.0
- Version:
- 2022-08-30
-
Constructor Summary
ConstructorsConstructorDescriptionProxyVFSSource
(VFSSource source) Constructs a proxy for the specified source. -
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.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
-
ProxyVFSSource
Constructs a proxy for the specified source.
-
-
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
-
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
-