Class JWFileItems

java.lang.Object
com.io7m.jwheatsheaf.ui.internal.JWFileItems

public final class JWFileItems extends Object
Functions over file items.
  • Method Details

    • listDirectory

      public static List<JWFileItem> listDirectory(Path directory, boolean withParent) throws IOException
      List the given directory, resolving each entry into a file item.
      Parameters:
      directory - The directory
      withParent - true if the parent directory entry should be included
      Returns:
      A list of items
      Throws:
      IOException - On I/O errors
    • resolveFileItem

      public static JWFileItem resolveFileItem(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