com.togethersoft.openapi.vfs
Interface VirtualFileVolume


public interface VirtualFileVolume

VirtualFileVolume is used to operate with filesystem roots. To operate with filesystem
root user shall mount it in VirtualFileManager. The system internally has standalone cache
for each volume. Cache for volume can be managed here.

Author:
TogetherSoft

Method Summary
 voidaddCacheControl(CacheControl control)
          Adds CacheControl to volume
 VirtualFileVolumeContextgetContext()
          Return default context for storing shared properties for files from this volume
 VirtualFilegetRoot(VirtualFileContext context)
          Returns the root VirtualFile of this volume
 booleanisAvailable()
          Checks if the volume is available to use now
 booleanisAvailable(boolean create, VirtualFileContext context)
          Checks if the volume is available to use now and creates root for
the new VirtualFileVolume if it is absent.
 voidremoveCacheControl(CacheControl control)
          Removes CacheControl to volume
 booleanunmount()
          Unmounts volume from the system, saving all caches

Method Detail

addCacheControl

public void addCacheControl(CacheControl control)
Adds CacheControl to volume

getContext

public VirtualFileVolumeContext getContext()
Return default context for storing shared properties for files from this volume
Returns: context of this volume

getRoot

public VirtualFile getRoot(VirtualFileContext context)
Returns the root VirtualFile of this volume
Returns: context of this volume

isAvailable

public boolean isAvailable()
Checks if the volume is available to use now

isAvailable

public boolean isAvailable(boolean create, VirtualFileContext context)
Checks if the volume is available to use now and creates root for
the new VirtualFileVolume if it is absent.

removeCacheControl

public void removeCacheControl(CacheControl control)
Removes CacheControl to volume

unmount

public boolean unmount()
Unmounts volume from the system, saving all caches