ch.qos.logback.core.util

## Class FileUtil

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.util.FileUtil

All Implemented Interfaces:
  ContextAware

    public class FileUtil
    extends ContextAwareBase

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
Constructor and Description
`FileUtil(Context context)`

### Method Summary

Methods
`void` `copy(java.lang.String src, java.lang.String destination)`
`static boolean` `createMissingParentDirectories(java.io.File file)` Creates the parent directories of a file.
`static java.net.URL` `fileToURL(java.io.File file)`
`java.lang.String` `resourceAsString(java.lang.ClassLoader classLoader, java.lang.String resourceName)`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

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

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

### Constructor Detail

#### FileUtil

    public FileUtil(Context context)

### Method Detail

#### fileToURL

    public static java.net.URL fileToURL(java.io.File file)

#### createMissingParentDirectories

    public static boolean createMissingParentDirectories(java.io.File file)

Creates the parent directories of a file. If parent directories not specified in file's path, then nothing is done and this returns gracefully.

Parameters:
  `file` - file whose parent directories (if any) should be created
Returns:
  `true` if either no parents were specified, or if all parent directories were created successfully; `false` otherwise

#### resourceAsString

    public java.lang.String resourceAsString(java.lang.ClassLoader classLoader,
                                    java.lang.String resourceName)

#### copy

    public void copy(java.lang.String src,
            java.lang.String destination)
              throws RolloverFailure

Throws:
  `RolloverFailure`