Package io.roastedroot.zerofs
Class Options
java.lang.Object
io.roastedroot.zerofs.Options
Utility methods for normalizing user-provided options arrays and sets to canonical immutable sets
of options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Set<OpenOption> private static final Set<OpenOption> private static final Set<OpenOption> static final Set<LinkOption> Empty LinkOption set.static final Set<LinkOption> Set containing LinkOption.NOFOLLOW_LINKS. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Set<OpenOption> addWrite(Collection<? extends OpenOption> options) Returns anSetcopy of the givenoptions, addingif it isn't already present.invalid reference
StandardOpenOption#WRITEstatic Set<CopyOption> getCopyOptions(CopyOption... options) Returns an immutable set of the given options for a copy.static Set<LinkOption> getLinkOptions(LinkOption... options) Returns an immutable set of link options.static Set<CopyOption> getMoveOptions(CopyOption... options) Returns an immutable set of the given options for a move.static Set<OpenOption> getOptionsForChannel(Set<? extends OpenOption> options) Returns an immutable set of open options for opening a new file channel.static Set<OpenOption> getOptionsForInputStream(OpenOption... options) Returns an immutable set of open options for opening a new input stream.static Set<OpenOption> getOptionsForOutputStream(OpenOption... options) Returns an immutable set of open options for opening a new output stream.
-
Field Details
-
NOFOLLOW_LINKS
Set containing LinkOption.NOFOLLOW_LINKS. -
FOLLOW_LINKS
Empty LinkOption set. -
DEFAULT_READ
-
DEFAULT_READ_NOFOLLOW_LINKS
-
DEFAULT_WRITE
-
-
Constructor Details
-
Options
private Options()
-
-
Method Details
-
getLinkOptions
Returns an immutable set of link options. -
getOptionsForChannel
Returns an immutable set of open options for opening a new file channel. -
getOptionsForInputStream
Returns an immutable set of open options for opening a new input stream. -
getOptionsForOutputStream
Returns an immutable set of open options for opening a new output stream. -
addWrite
Returns anSetcopy of the givenoptions, addingif it isn't already present.invalid reference
StandardOpenOption#WRITE -
getMoveOptions
Returns an immutable set of the given options for a move. -
getCopyOptions
Returns an immutable set of the given options for a copy.
-