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

public abstract Class FileUtils

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.jna.examples.FileUtils.W32FileUtils, com.sun.jna.examples.FileUtils.MacFileUtils, com.sun.jna.examples.FileUtils.DefaultFileUtils
Imports
java.io.File, com.sun.jna.examples.win32.Shell32, .Shell32.SHFILEOPSTRUCT

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.

private static class
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static FileUtils
public boolean
public abstract boolean
moveToTrash(File[] 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 boolean moveToTrash(File[] files)

Move the given file to the system trash, if one is available. Returns whether the operation was successful.

com.sun.jna.examples 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 boolean
moveToTrash(File[] files)

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

The default implementation attempts to move the file to the desktop "Trash" folder.
Inherited from com.sun.jna.examples.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.examples.FileUtils.hasTrash.

moveToTrashback to summary
public boolean moveToTrash(File[] files)

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

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

com.sun.jna.examples 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()
com.sun.jna.examples back to summary

private Class FileUtils.MacFileUtils

extends FileUtils
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
moveToTrash(File[] files)

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

Move the given file to the system trash, if one is available.
Inherited from com.sun.jna.examples.FileUtils:
getInstance

Constructor Detail

MacFileUtilsback to summary
private MacFileUtils()

Method Detail

hasTrashback to summary
public boolean hasTrash()

Overrides com.sun.jna.examples.FileUtils.hasTrash.

moveToTrashback to summary
public boolean moveToTrash(File[] files)

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

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

Move the given file to the system trash, if one is available. Returns whether the operation was successful.

com.sun.jna.examples back to summary

private Class FileUtils.W32FileUtils

extends FileUtils
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
moveToTrash(File[] files)

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

Move the given file to the system trash, if one is available.
Inherited from com.sun.jna.examples.FileUtils:
getInstance

Constructor Detail

W32FileUtilsback to summary
private W32FileUtils()

Method Detail

hasTrashback to summary
public boolean hasTrash()

Overrides com.sun.jna.examples.FileUtils.hasTrash.

moveToTrashback to summary
public boolean moveToTrash(File[] files)

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

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

Move the given file to the system trash, if one is available. Returns whether the operation was successful.