APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.jpackage.internal

pack-priv final Class TempDirectory

extends Object
implements Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.Closeable, .IOException, java.nio.file.FileVisitResult, .FileVisitor, .Files, .Path, java.nio.file.attribute.BasicFileAttributes, java.util.ArrayList, .Collections, .List, .Objects, .Optional, java.util.concurrent.TimeUnit, jdk.jpackage.internal.cli.Options, .StandardOption, jdk.jpackage.internal.util.FileUtils, .Slot

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static record

Field Summary

Modifier and TypeField and Description
private final boolean
private static final int
private final Path
private final RetryExecutorFactory

Constructor Summary

AccessConstructor and Description
pack-priv
TempDirectory(Options options, RetryExecutorFactory retryExecutorFactory)

pack-priv
TempDirectory(Optional<Path> tempDir, RetryExecutorFactory retryExecutorFactory)

pack-priv
TempDirectory(Path tempDir, boolean deleteOnClose, RetryExecutorFactory retryExecutorFactory)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

pack-priv boolean
pack-priv Options
map(Options options)

pack-priv Path
path()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

deleteOnCloseback to summary
private final boolean deleteOnClose
MAX_REPORTED_UNDELETED_FILE_COUNTback to summary
private static final int MAX_REPORTED_UNDELETED_FILE_COUNT
pathback to summary
private final Path path
retryExecutorFactoryback to summary
private final RetryExecutorFactory retryExecutorFactory

Constructor Detail

TempDirectoryback to summary
pack-priv TempDirectory(Options options, RetryExecutorFactory retryExecutorFactory) throws IOException
TempDirectoryback to summary
pack-priv TempDirectory(Optional<Path> tempDir, RetryExecutorFactory retryExecutorFactory) throws IOException
TempDirectoryback to summary
pack-priv TempDirectory(Path tempDir, boolean deleteOnClose, RetryExecutorFactory retryExecutorFactory) throws IOException

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
deleteOnCloseback to summary
pack-priv boolean deleteOnClose()
mapback to summary
pack-priv Options map(Options options)
pathback to summary
pack-priv Path path()
jdk.jpackage.internal back to summary

pack-priv final Record TempDirectory.DirectoryListing

extends Record
Class Inheritance
Record Components
paths:List<Path> 
complete:boolean 

Field Summary

Modifier and TypeField and Description
private final boolean
complete

Record Component accessed by complete().

private final List<Path>
paths

Record Component accessed by paths().

Constructor Summary

AccessConstructor and Description
pack-priv
DirectoryListing(List<Path> paths, boolean complete)

Method Summary

Modifier and TypeMethod and Description
public boolean
complete()

Record Component getter of complete.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

pack-priv static TempDirectory.DirectoryListing
public List<Path>
paths()

Record Component getter of paths.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

completeback to summary
private final boolean complete

Record Component accessed by complete().

pathsback to summary
private final List<Path> paths

Record Component accessed by paths().

Constructor Detail

DirectoryListingback to summary
pack-priv DirectoryListing(List<Path> paths, boolean complete)

Method Detail

completeback to summary
public boolean complete()

Record Component getter of complete.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

listFilesAndEmptyDirectoriesback to summary
pack-priv static TempDirectory.DirectoryListing listFilesAndEmptyDirectories(Path path, int limit)
pathsback to summary
public List<Path> paths()

Record Component getter of paths.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

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.