Package com.io7m.jwheatsheaf.ui.internal
Class JWFileItems
- java.lang.Object
-
- com.io7m.jwheatsheaf.ui.internal.JWFileItems
-
public final class JWFileItems extends java.lang.ObjectFunctions 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 JWFileItemresolveFileItem(java.nio.file.Path path)Resolve the given path into a file item.
-
-
-
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
-
-