# HG changeset patch # User Alexander Simon # Date 1328029340 -14400 # Node ID e4fe8e3e09aba5378dbc5b3784bc3915abc3bbc0 # Parent e4342c4dc6758da9429cc134800583907f65302c fixing Bug #207659 add temp file creation API to FileObject - initial variant (without implementation) diff --git a/openide.filesystems/src/org/openide/filesystems/FileSystem.java b/openide.filesystems/src/org/openide/filesystems/FileSystem.java --- a/openide.filesystems/src/org/openide/filesystems/FileSystem.java +++ b/openide.filesystems/src/org/openide/filesystems/FileSystem.java @@ -425,6 +425,36 @@ */ public abstract FileObject findResource(String name); + /** Returns temporary folder if it is avaliable on this file system. + * Method never returns null. IOException is thrown instead. + * @return a file object for temporary folder + */ + public FileObject getTempFolder() throws IOException { + throw new IOException("Unsupported operation"); // NOI18N + } + + /** Creates temporary folder in the given parent folder. + * @param parent the parent folder where temporary folder will be created + * @param prefix prefix of the name of created folder + * @param suffix suffix of the name of created folder + * @return new temporary folder + * @throws IOException + */ + public FileObject createTempFolder(FileObject parent, String prefix, String suffix) throws IOException { + throw new IOException("Unsupported operation"); // NOI18N + } + + /** Creates temporary file in the given parent folder. + * @param parent the parent folder where temporary file will be created + * @param prefix prefix of the name of created file + * @param suffix suffix of the name of created file + * @return new temporary file + * @throws IOException + */ + public FileObject createTempFile(FileObject parent, String prefix, String suffix) throws IOException { + throw new IOException("Unsupported operation"); // NOI18N + } + /** Returns an array of actions that can be invoked on any file in * this filesystem. * These actions should preferably