Top Description Inners Constructors Methods
com.sun.jna.platform

public abstract Class FileUtils

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.FileUtils.DefaultFileUtils, com.sun.jna.platform.mac.MacFileUtils, com.sun.jna.platform.win32.W32FileUtils
Imports
java.io.File, .IOException, java.util.ArrayList, .List, com.sun.jna.platform.mac.MacFileUtils, com.sun.jna.platform.win32.W32FileUtils

Miscellaneous file utils not provided for by Java.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
FileUtils.Holder

Canonical lazy loading of a singleton.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static FileUtils
public boolean
public abstract void
moveToTrash(File...
files to move
files
)

Move the given file to the system trash, if one is available.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FileUtilsback to summary
public FileUtils()

Method Detail

getInstanceback to summary
public static FileUtils getInstance()
hasTrashback to summary
public boolean hasTrash()
moveToTrashback to summary
public abstract void moveToTrash(File... files) throws IOException

Move the given file to the system trash, if one is available.

Parameters
files:File[]

files to move

Exceptions
IOException:
on failure.
com.sun.jna.platform back to summary

private Class FileUtils.DefaultFileUtils

extends FileUtils
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private File
public boolean
public void
moveToTrash(File...
files to move
files
)

Implements abstract com.sun.jna.platform.FileUtils.moveToTrash.

The default implementation attempts to move the file to the desktop "Trash" folder.
Inherited from com.sun.jna.platform.FileUtils:
getInstance

Constructor Detail

DefaultFileUtilsback to summary
private DefaultFileUtils()

Method Detail

getTrashDirectoryback to summary
private File getTrashDirectory()
hasTrashback to summary
public boolean hasTrash()

Overrides com.sun.jna.platform.FileUtils.hasTrash.

Annotations
@Override
moveToTrashback to summary
public void moveToTrash(File... files) throws IOException

Implements abstract com.sun.jna.platform.FileUtils.moveToTrash.

The default implementation attempts to move the file to the desktop "Trash" folder.

Parameters
files:File[]

Doc from com.sun.jna.platform.FileUtils.moveToTrash.

files to move

Annotations
@Override
Exceptions
IOException:

Doc from com.sun.jna.platform.FileUtils.moveToTrash.

on failure.

com.sun.jna.platform back to summary

private Class FileUtils.Holder

extends Object
Class Inheritance

Canonical lazy loading of a singleton.

Field Summary

Modifier and TypeField and Description
public static final FileUtils

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final FileUtils INSTANCE

Constructor Detail

Holderback to summary
private Holder()