public class FileUtils
extends java.lang.Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.File from,
java.io.File to) |
static void |
copyFolder(java.io.File from,
java.io.File to) |
static void |
copyResource(org.bukkit.plugin.java.JavaPlugin plugin,
java.lang.String resource,
java.io.File fileOut)
copy a resource file inside the plugin's jar file
|
static void |
copyStreams(java.io.InputStream in,
java.io.OutputStream out) |
static void |
copyURLtoFile(java.net.URL url,
java.io.File file) |
static void |
createFileAndPath(java.io.File file)
Create the given file if it doesn't exist, will also create directories if
they do not exist.
If the file already exist, nothing will happen. |
static void |
deleteFolder(java.io.File folder) |
static java.lang.Object |
deserialize(java.io.File file) |
static java.lang.String |
getPluginJarPath(org.bukkit.plugin.java.JavaPlugin plugin) |
static void |
serialize(java.io.Serializable object,
java.io.File file) |
static void |
setModifiedDate(java.io.File file,
long timeInMil) |
static void |
unzip(java.io.File zipFile,
java.io.File directroy) |
static void |
zip(java.io.File source,
java.io.File output) |
public static void createFileAndPath(java.io.File file) throws java.io.IOException
java.io.IOException
public static void copyURLtoFile(java.net.URL url, java.io.File file) throws java.io.IOException
java.io.IOException
public static void copyFolder(java.io.File from, java.io.File to) throws java.io.IOException
java.io.IOException
public static void copyFile(java.io.File from, java.io.File to) throws java.io.IOException
java.io.IOException
public static void deleteFolder(java.io.File folder) throws java.io.IOException
java.io.IOException
public static void copyStreams(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static void unzip(java.io.File zipFile, java.io.File directroy) throws java.io.IOException
java.io.IOException
public static void zip(java.io.File source, java.io.File output) throws java.io.IOException
java.io.IOException
public static void copyResource(org.bukkit.plugin.java.JavaPlugin plugin, java.lang.String resource, java.io.File fileOut) throws java.io.IOException
java.io.IOException
public static void serialize(java.io.Serializable object, java.io.File file)
public static java.lang.Object deserialize(java.io.File file)
public static java.lang.String getPluginJarPath(org.bukkit.plugin.java.JavaPlugin plugin)
plugin
- public static void setModifiedDate(java.io.File file, long timeInMil)