Package com.google.common.io
Class TempFileCreator
java.lang.Object
com.google.common.io.TempFileCreator
- Direct Known Subclasses:
TempFileCreator.JavaIoCreator
,TempFileCreator.JavaNioCreator
,TempFileCreator.ThrowingCreator
Creates temporary files and directories whose permissions are restricted to the current user or,
in the case of Android, the current app. If that is not possible (as is the case under the very
old Android Ice Cream Sandwich release), then this class throws an exception instead of creating
a file or directory that would be more accessible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract File
(package private) abstract File
createTempFile
(String prefix) private static TempFileCreator
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
TempFileCreator
private TempFileCreator()
-
-
Method Details
-
createTempDir
- Throws:
IllegalStateException
- if the directory could not be created (to implement the contract ofFiles.createTempDir()
, such as if the system does not support creating temporary directories securely
-
createTempFile
- Throws:
IOException
-
pickSecureCreator
-