org.apache.cassandra.io.util

## Class FileUtils

- java.lang.Object
- - org.apache.cassandra.io.util.FileUtils

-     public class FileUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clean(java.nio.MappedByteBuffer buffer)`
    `static void` | `close(java.io.Closeable... cs)`
    `static void` | `close(java.lang.Iterable<? extends java.io.Closeable> cs)`
    `static void` | `closeQuietly(java.io.Closeable c)`
    `static void` | `createDirectory(java.io.File directory)`
    `static void` | `createDirectory(java.lang.String directory)`
    `static void` | `createHardLink(java.io.File from, java.io.File to)`
    `static java.io.File` | `createTempFile(java.lang.String prefix, java.lang.String suffix)`
    `static java.io.File` | `createTempFile(java.lang.String prefix, java.lang.String suffix, java.io.File directory)`
    `static void` | `delete(java.io.File[] files)`
    `static boolean` | `delete(java.lang.String file)`
    `static void` | `deleteAsync(java.lang.String file)`
    `static void` | `deleteRecursive(java.io.File dir)` Deletes all files and subdirectories under "dir".
    `static void` | `deleteWithConfirm(java.io.File file)`
    `static void` | `deleteWithConfirm(java.lang.String file)`
    `static java.lang.String` | `getCanonicalPath(java.io.File file)`
    `static java.lang.String` | `getCanonicalPath(java.lang.String filename)`
    `static void` | `handleFSError(FSError e)`
    `static boolean` | `isCleanerAvailable()`
    `static void` | `renameWithConfirm(java.io.File from, java.io.File to)`
    `static void` | `renameWithConfirm(java.lang.String from, java.lang.String to)`
    `static void` | `renameWithOutConfirm(java.lang.String from, java.lang.String to)`
    `static void` | `skipBytesFully(java.io.DataInput in, int bytes)`
    `static void` | `skipBytesFully(java.io.DataInput in, long bytes)`
    `static java.lang.String` | `stringifyFileSize(double value)`
    `static void` | `truncate(java.lang.String path, long size)`

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

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

- - ### Constructor Detail

    - #### FileUtils

          public FileUtils()

  - ### Method Detail

    - #### createHardLink

          public static void createHardLink(java.io.File from,
                            java.io.File to)

    - #### createTempFile

          public static java.io.File createTempFile(java.lang.String prefix,
                                    java.lang.String suffix,
                                    java.io.File directory)

    - #### createTempFile

          public static java.io.File createTempFile(java.lang.String prefix,
                                    java.lang.String suffix)

    - #### deleteWithConfirm

          public static void deleteWithConfirm(java.lang.String file)

    - #### deleteWithConfirm

          public static void deleteWithConfirm(java.io.File file)

    - #### renameWithOutConfirm

          public static void renameWithOutConfirm(java.lang.String from,
                                  java.lang.String to)

    - #### renameWithConfirm

          public static void renameWithConfirm(java.lang.String from,
                               java.lang.String to)

    - #### renameWithConfirm

          public static void renameWithConfirm(java.io.File from,
                               java.io.File to)

    - #### truncate

          public static void truncate(java.lang.String path,
                      long size)

    - #### closeQuietly

          public static void closeQuietly(java.io.Closeable c)

    - #### close

          public static void close(java.io.Closeable... cs)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### close

          public static void close(java.lang.Iterable<? extends java.io.Closeable> cs)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getCanonicalPath

          public static java.lang.String getCanonicalPath(java.lang.String filename)

    - #### getCanonicalPath

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

    - #### isCleanerAvailable

          public static boolean isCleanerAvailable()

    - #### clean

          public static void clean(java.nio.MappedByteBuffer buffer)

    - #### createDirectory

          public static void createDirectory(java.lang.String directory)

    - #### createDirectory

          public static void createDirectory(java.io.File directory)

    - #### delete

          public static boolean delete(java.lang.String file)

    - #### delete

          public static void delete(java.io.File[] files)

    - #### deleteAsync

          public static void deleteAsync(java.lang.String file)

    - #### stringifyFileSize

          public static java.lang.String stringifyFileSize(double value)

    - #### deleteRecursive

          public static void deleteRecursive(java.io.File dir)

      Deletes all files and subdirectories under "dir".
      Parameters:
        `dir` - Directory to be deleted
      Throws:
        `FSWriteError` - if any part of the tree cannot be deleted

    - #### skipBytesFully

          public static void skipBytesFully(java.io.DataInput in,
                            int bytes)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### skipBytesFully

          public static void skipBytesFully(java.io.DataInput in,
                            long bytes)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### handleFSError

          public static void handleFSError(FSError e)

Copyright © 2014 The Apache Software Foundation