org.apache.cassandra.io.util
Class FileUtils
java.lang.Object
org.apache.cassandra.io.util.FileUtils
public class FileUtils
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtils
public FileUtils()
deleteWithConfirm
public static void deleteWithConfirm(java.lang.String file)
throws java.io.IOException
- Throws:
java.io.IOException
deleteWithConfirm
public static void deleteWithConfirm(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
renameWithConfirm
public static void renameWithConfirm(java.io.File from,
java.io.File to)
throws java.io.IOException
- Throws:
java.io.IOException
truncate
public static void truncate(java.lang.String path,
long size)
throws java.io.IOException
- Throws:
java.io.IOException
closeQuietly
public static void closeQuietly(java.io.Closeable c)
close
public static void close(java.lang.Iterable<? extends java.io.Closeable> cs)
throws java.io.IOException
- Throws:
java.io.IOException
createDirectory
public static void createDirectory(java.lang.String directory)
throws java.io.IOException
- Throws:
java.io.IOException
delete
public static boolean delete(java.lang.String file)
delete
public static boolean delete(java.util.List<java.lang.String> files)
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)
throws java.io.IOException
- Deletes all files and subdirectories under "dir".
- Parameters:
dir
- Directory to be deleted
- Throws:
java.io.IOException
- 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
Copyright © 2011 The Apache Software Foundation