org.eclipse.gef4.dot.internal.dot.export

## Class DotFileUtils

- java.lang.Object
- - org.eclipse.gef4.dot.internal.dot.export.DotFileUtils

    public final class DotFileUtils
    extends java.lang.Object

Static helper methods for working with files.

### Method Summary

Methods
`static void` `close(java.io.Closeable closeable)`
`static void` `copyAllFiles(java.io.File sourceRootFolder, java.io.File destinationRootFolder)` Recursively copies the contents of the source folder to the destination folder.
`static java.io.File` `copySingleFile(java.io.File destinationFolder, java.lang.String newFileName, java.io.File sourceFile)`
`static java.lang.String` `read(java.io.File file)`
`static java.io.File` `resolve(java.net.URL url)`
`static java.io.File` `write(java.lang.String text)`
`static java.io.File` `write(java.lang.String text, java.io.File destination)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### resolve

    public static java.io.File resolve(java.net.URL url)

Parameters:
  `url` - The URL to resolve (can be workspace-relative)
Returns:
  The file corresponding to the given URL

#### write

    public static java.io.File write(java.lang.String text)

Parameters:
  `text` - The string to write out to a temp file
Returns:
  The temp file containing the given string

#### write

    public static java.io.File write(java.lang.String text,
                     java.io.File destination)

Parameters:
  `text` - The string to write out to a file
  `destination` - The file to write the string to
Returns:
  The file containing the given string

#### read

    public static java.lang.String read(java.io.File file)

Parameters:
  `file` - The file to read into a string
Returns:
  The string containing the contents of the given file

#### close

    public static void close(java.io.Closeable closeable)

Parameters:
  `closeable` - The closable to safely close

#### copyAllFiles

    public static void copyAllFiles(java.io.File sourceRootFolder,
                    java.io.File destinationRootFolder)

Recursively copies the contents of the source folder to the destination folder.

Parameters:
  `sourceRootFolder` - The source root folder
  `destinationRootFolder` - The destination root folder

#### copySingleFile

    public static java.io.File copySingleFile(java.io.File destinationFolder,
                              java.lang.String newFileName,
                              java.io.File sourceFile)

Parameters:
  `destinationFolder` - The destination folder
  `newFileName` - The name for the new file
  `sourceFile` - The source file to be copied into a new file in the destination folder, with the specified name
Returns:
  The newly created copy of the source file