Package thredds.filesystem
Class ControllerOS7
- java.lang.Object
-
- thredds.filesystem.ControllerOS7
-
- All Implemented Interfaces:
MController
@ThreadSafe public class ControllerOS7 extends Object implements MController
Use Java 7 NIO for scanning the file system- Since:
- 11/8/13
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classControllerOS7.PrintFiles
-
Constructor Summary
Constructors Constructor Description ControllerOS7()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Iterator<MFile>getInventoryAll(CollectionConfig mc, boolean recheck)Returns all leaves in collection, recursing into subdirectories.Iterator<MFile>getInventoryTop(CollectionConfig mc, boolean recheck)Returns all leaves in top collection, not recursing into subdirectories.Iterator<MFile>getSubdirs(CollectionConfig mc, boolean recheck)Returns all subdirectories in top collection.
-
-
-
Method Detail
-
getInventoryAll
public Iterator<MFile> getInventoryAll(CollectionConfig mc, boolean recheck)
Description copied from interface:MControllerReturns all leaves in collection, recursing into subdirectories.- Specified by:
getInventoryAllin interfaceMController- Parameters:
mc- defines the collection to scanrecheck- if false, may use cached results. otherwise must sync with File OS- Returns:
- iterator over Mfiles, or null if collection does not exist
-
getInventoryTop
public Iterator<MFile> getInventoryTop(CollectionConfig mc, boolean recheck) throws IOException
Description copied from interface:MControllerReturns all leaves in top collection, not recursing into subdirectories.- Specified by:
getInventoryTopin interfaceMController- Parameters:
mc- defines the collection to scanrecheck- if false, may use cached results. otherwise must sync with File OS- Returns:
- iterator over Mfiles, or null if collection does not exist
- Throws:
IOException
-
getSubdirs
public Iterator<MFile> getSubdirs(CollectionConfig mc, boolean recheck)
Description copied from interface:MControllerReturns all subdirectories in top collection.- Specified by:
getSubdirsin interfaceMController- Parameters:
mc- defines the collection to scanrecheck- if false, may use cached results. otherwise must sync with File OS- Returns:
- iterator over Mfiles, or null if collection does not exist
-
close
public void close()
- Specified by:
closein interfaceMController
-
-