APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.nio.file

pack-priv Class TempFileHelper

extends Object
Class Inheritance
Imports
java.util.Set, .EnumSet, java.security.SecureRandom, java.io.IOException, java.nio.file.attribute.FileAttribute, .PosixFilePermission, .PosixFilePermissions, jdk.internal.util.StaticProperty

Helper class to support creation of temporary files and directories with initial attributes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final SecureRandom
private static final Path

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Path
create(Path dir, String prefix, String suffix, boolean createDirectory, FileAttribute<?>[] attrs)

Creates a file or directory in the given directory (or in the temporary directory if dir is null).

pack-priv static Path
createTempDirectory(Path dir, String prefix, FileAttribute<?>[] attrs)

Creates a temporary directory in the given directory, or in the temporary directory if dir is null.

pack-priv static Path
createTempFile(Path dir, String prefix, String suffix, FileAttribute<?>[] attrs)

Creates a temporary file in the given directory, or in the temporary directory if dir is null.

private static Path
generatePath(String prefix, String suffix, Path dir)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isPosixback to summary
private static final boolean isPosix
randomback to summary
private static final SecureRandom random
tmpdirback to summary
private static final Path tmpdir

Constructor Detail

TempFileHelperback to summary
private TempFileHelper()

Method Detail

createback to summary
private static Path create(Path dir, String prefix, String suffix, boolean createDirectory, FileAttribute<?>[] attrs) throws IOException

Creates a file or directory in the given directory (or in the temporary directory if dir is null).

createTempDirectoryback to summary
pack-priv static Path createTempDirectory(Path dir, String prefix, FileAttribute<?>[] attrs) throws IOException

Creates a temporary directory in the given directory, or in the temporary directory if dir is null.

createTempFileback to summary
pack-priv static Path createTempFile(Path dir, String prefix, String suffix, FileAttribute<?>[] attrs) throws IOException

Creates a temporary file in the given directory, or in the temporary directory if dir is null.

generatePathback to summary
private static Path generatePath(String prefix, String suffix, Path dir)
java.nio.file back to summary

private Class TempFileHelper.PosixPermissions

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final FileAttribute<Set<PosixFilePermission>>
pack-priv static final FileAttribute<Set<PosixFilePermission>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dirPermissionsback to summary
pack-priv static final FileAttribute<Set<PosixFilePermission>> dirPermissions
filePermissionsback to summary
pack-priv static final FileAttribute<Set<PosixFilePermission>> filePermissions

Constructor Detail

PosixPermissionsback to summary
private PosixPermissions()