Class IO_DB


  • public class IO_DB
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IO_DB()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.File asFile​(Location loc)
      Convert a Location to a File.
      static Location asLocation​(java.nio.file.Path path)
      Convert a Path to a Location.
      static java.nio.file.Path asPath​(Location location)
      Convert a Location to a Path.
      static int extractIndex​(java.lang.String name, java.lang.String namebase, java.lang.String nameSep)
      Given a filename in "base-NNNN" format, return the value of NNNN
      static java.util.List<java.nio.file.Path> scanForDirByPattern​(java.nio.file.Path directory, java.lang.String namebase, java.lang.String nameSep)
      Find the files in this directory that have namebase as a prefix and are then numbered.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IO_DB

        public IO_DB()
    • Method Detail

      • asLocation

        public static Location asLocation​(java.nio.file.Path path)
        Convert a Path to a Location.
      • asPath

        public static java.nio.file.Path asPath​(Location location)
        Convert a Location to a Path.
      • asFile

        public static java.io.File asFile​(Location loc)
        Convert a Location to a File.
      • scanForDirByPattern

        public static java.util.List<java.nio.file.Path> scanForDirByPattern​(java.nio.file.Path directory,
                                                                             java.lang.String namebase,
                                                                             java.lang.String nameSep)
        Find the files in this directory that have namebase as a prefix and are then numbered.

        Returns a sorted list from, low to high index.

      • extractIndex

        public static int extractIndex​(java.lang.String name,
                                       java.lang.String namebase,
                                       java.lang.String nameSep)
        Given a filename in "base-NNNN" format, return the value of NNNN