Class JWFileItems


  • public final class JWFileItems
    extends java.lang.Object
    Functions over file items.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<JWFileItem> listDirectory​(java.nio.file.Path directory)
      List the given directory, resolving each entry into a file item.
      static JWFileItem resolveFileItem​(java.nio.file.Path path)
      Resolve the given path into a file item.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • listDirectory

        public static java.util.List<JWFileItem> listDirectory​(java.nio.file.Path directory)
                                                        throws java.io.IOException
        List the given directory, resolving each entry into a file item.
        Parameters:
        directory - The directory
        Returns:
        A list of items
        Throws:
        java.io.IOException - On I/O errors
      • resolveFileItem

        public static JWFileItem resolveFileItem​(java.nio.file.Path path)
        Resolve the given path into a file item. If the file item cannot be resolved due to permissions errors or other I/O errors, a file item is returned with identity values in each field (such as 0 for the file size).
        Parameters:
        path - The input path
        Returns:
        A file item