| Modifier and Type | Class and Description |
|---|---|
| private static record | |
| private static record | |
| public static interface | PathGroup.
Handler of file copying and directory creating. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | copy(PathGroup
the destination path group dst, CopyOption... options)Copies files/directories from the locations in the path group into the locations of the given path group. |
| private static void | |
| private static void | |
| private void | |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Path | |
| public void | |
| public int | |
| public Set | |
| private static boolean | |
| public void | move(PathGroup
the destination path group dst, CopyOption... options)Similar to |
| public List | Returns: paths associated with all identifiers in this path groupGets paths associated with all identifiers in this path group. |
| public PathGroup | |
| public List | |
| public void | |
| public long | Returns: the total number of bytes in root paths of this path groupGets the number of bytes in root paths of this path group. |
| private static long | |
| public void | transform(PathGroup
the destination path group dst, PathGroup.the path transformation handler handlerSimilar to |
| entries | back to summary |
|---|---|
| private final Map<Object, Path> entries | |
| PathGroup | back to summary |
|---|---|
| public PathGroup(Map<Object, Path> paths) Creates path group with the initial paths. | |
| copy | back to summary |
|---|---|
| public void copy(PathGroup dst, CopyOption... options) throws IOException Copies files/directories from the locations in the path group into the locations of the given path group. For every identifier found in this and the given group, copy the associated file or directory from the location specified by the path value associated with the identifier in this group into the location associated with the identifier in the given group.
| |
| copy | back to summary |
|---|---|
| private static void copy(PathGroup src, PathGroup dst, PathGroup. | |
| copy | back to summary |
|---|---|
| private static void copy(List<PathGroup. | |
| deleteEntries | back to summary |
|---|---|
| private void deleteEntries() throws IOException | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getPath | back to summary |
|---|---|
| public Path getPath(Object id) Returns a path associated with the given identifier in this path group. | |
| ghostPath | back to summary |
|---|---|
| public void ghostPath(Path path) Adds a path associated with the new unique identifier to this path group.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| keys | back to summary |
|---|---|
| public Set Gets all identifiers of this path group. The order of identifiers in the returned list is undefined. | |
| match | back to summary |
|---|---|
| private static boolean match(Path what, List<Path> paths) | |
| move | back to summary |
|---|---|
| public void move(PathGroup dst, CopyOption... options) throws IOException Similar to
| |
| paths | back to summary |
|---|---|
| public List Gets paths associated with all identifiers in this path group. The order of paths in the returned list is undefined. | |
| resolveAt | back to summary |
|---|---|
| public PathGroup resolveAt(Path root) Creates a copy of this path group with all paths resolved against the given
root. Taken action is equivalent to creating a copy of this path group and
calling | |
| roots | back to summary |
|---|---|
| public List Gets root paths in this path group. If multiple identifiers are associated with the same path value in the group, the path value is added to the returned list only once. Paths that are descendants of other paths in the group are not added to the returned list. The order of paths in the returned list is undefined. | |
| setPath | back to summary |
|---|---|
| public void setPath(Object id, Path path) Assigns the specified path value to the given identifier in this path group.
If the given identifier doesn't exist in this path group, it is added,
otherwise, the current value associated with the identifier is replaced with
the given path value. If the path value is | |
| sizeInBytes | back to summary |
|---|---|
| public long sizeInBytes() throws IOException Gets the number of bytes in root paths of this path group. The method sums the size of all root path entries in the group. If the path entry is a directory it calculates the total size of the files in the directory. If the path entry is a file, it takes its size.
| |
| sizeInBytes | back to summary |
|---|---|
| private static long sizeInBytes(Path path) throws UncheckedIOException | |
| transform | back to summary |
|---|---|
| public void transform(PathGroup dst, PathGroup. Similar to
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | followSymlinks
Record Component accessed by followSymlinks(). |
| private final boolean | |
| private final CopyOption[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | copyFile(Path src, Path dst)
Overrides default jdk. Request to copy a file from the given source location into the given destination location. |
| public void | createDirectory(Path dir)
Overrides default jdk. Request to create a directory at the given location. |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public boolean | |
| public final int | |
| public boolean | |
| public CopyOption[] | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| followSymlinks | back to summary |
|---|---|
| private final boolean followSymlinks Record Component accessed by followSymlinks(). | |
| move | back to summary |
|---|---|
| private final boolean move Record Component accessed by move(). | |
| options | back to summary |
|---|---|
| private final CopyOption[] options Record Component accessed by options(). | |
| Copy | back to summary |
|---|---|
| pack-priv Copy(boolean move, CopyOption... options) | |
| Copy | back to summary |
|---|---|
| private Copy(boolean move, boolean followSymlinks, CopyOption... options) | |
| copyFile | back to summary |
|---|---|
| public void copyFile(Path src, Path dst) throws IOException Overrides default jdk. Doc from jdk. Request to copy a file from the given source location into the given destination location.
| |
| createDirectory | back to summary |
|---|---|
| public void createDirectory(Path dir) throws IOException Overrides default jdk. Doc from jdk. Request to create a directory at the given location.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| followSymlinks | back to summary |
|---|---|
| public boolean followSymlinks() Record Component getter of followSymlinks. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| move | back to summary |
|---|---|
| public boolean move() Record Component getter of move. | |
| options | back to summary |
|---|---|
| public CopyOption[] options() Record Component getter of options. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Path | basepath
Record Component accessed by basepath(). |
| private final Path | |
| private final Path |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Path | |
| public boolean | equals(Object obj)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public Path | |
| pack-priv Path | |
| public int | |
| public Path | |
| pack-priv Path | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| basepath | back to summary |
|---|---|
| private final Path basepath Record Component accessed by basepath(). | |
| from | back to summary |
|---|---|
| private final Path from Record Component accessed by from(). | |
| to | back to summary |
|---|---|
| private final Path to Record Component accessed by to(). | |
| CopySpec | back to summary |
|---|---|
| pack-priv CopySpec(Path basepath, Path from, Path to) | |
| CopySpec | back to summary |
|---|---|
| pack-priv CopySpec(Path from, Path to) | |
| basepath | back to summary |
|---|---|
| public Path basepath() Record Component getter of basepath. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| from | back to summary |
|---|---|
| public Path from() Record Component getter of from. | |
| fromNormalized | back to summary |
|---|---|
| pack-priv Path fromNormalized() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| to | back to summary |
|---|---|
| public Path to() Record Component getter of to. | |
| toNormalized | back to summary |
|---|---|
| pack-priv Path toNormalized() | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
transform
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void | copySymbolicLink(Path
the source symbolic link location src, Path the destination symbolic link location dst)Request to copy a symbolic link from the given source location into the given destination location. |
| public default void | createDirectory(Path
the path where the directory is requested to be created dir)Request to create a directory at the given location. |
| copyFile | back to summary |
|---|---|
| public default void copyFile(Path src, Path dst) throws IOException Request to copy a file from the given source location into the given destination location. Implementation Note Default implementation takes no action
| |
| copySymbolicLink | back to summary |
|---|---|
| public default void copySymbolicLink(Path src, Path dst) throws IOException Request to copy a symbolic link from the given source location into the given destination location. Implementation Note Default implementation calls
| |
| createDirectory | back to summary |
|---|---|
| public default void createDirectory(Path dir) throws IOException Request to create a directory at the given location. Implementation Note Default implementation takes no action
| |