cz.vity.freerapid.utilities
Class FileUtils
java.lang.Object
cz.vity.freerapid.utilities.FileUtils
public class FileUtils
- extends Object
- Author:
- Ladislav Vitasek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BACKUP_EXTENSION
public static final String BACKUP_EXTENSION
- See Also:
- Constant Field Values
createEmptyFile
public static OutputStream createEmptyFile(File f,
long size,
DownloadTask task)
throws IOException
- Vytvori prazdny soubor o dane velikosti vyplneny nulami.
Soubor vytvari zapisem v bufferu o velikosti 1MB.
- Parameters:
f
- souborsize
- velikosttask
- running task
- Returns:
- soubor pro zapis nahodnych dat - nastaveny na zacatek
- Throws:
IOException
- vyjimka pri IO
makeBackup
public static void makeBackup(File srcFile)
throws IOException
- Throws:
IOException
renewBackup
public static void renewBackup(File srcFile)
throws IOException
- Throws:
IOException
getBackupFile
public static File getBackupFile(File srcFile)
getRelativeDirectory
public static File getRelativeDirectory(File base,
File file)
copyfile
public static void copyfile(File srcFile,
File dstFile)
throws IOException
- Throws:
IOException
getAbsolutPath
public static String getAbsolutPath(String path)
getAbsolutPath
public static String getAbsolutPath(File file)