Package com.io7m.jwheatsheaf.ui.internal
Class JWFileItems
java.lang.Object
com.io7m.jwheatsheaf.ui.internal.JWFileItems
Functions over file items.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<JWFileItem>
listDirectory
(Path directory, boolean withParent) List the given directory, resolving each entry into a file item.static JWFileItem
resolveFileItem
(Path path) Resolve the given path into a file item.
-
Method Details
-
listDirectory
List the given directory, resolving each entry into a file item.- Parameters:
directory
- The directorywithParent
-true
if the parent directory entry should be included- Returns:
- A list of items
- Throws:
IOException
- On I/O errors
-
resolveFileItem
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
-