Top Description Inners Fields Constructors Methods
org.xnio

public Class FileChangeEvent

extends Object
Class Inheritance
Imports
java.io.File

The event object that is fired when a file system change is detected.
Author
Stuart Douglas
See Also
FileSystemWatcher

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
FileChangeEvent.Type

Watched file event types.

Field Summary

Modifier and TypeField and Description
private final File
private final FileChangeEvent.Type

Constructor Summary

AccessConstructor and Description
public
FileChangeEvent(File
the file which is being watched
file
,
FileChangeEvent.Type
the type of event that was encountered
type
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public File

Returns:

the file which was being watched
getFile
()

Get the file which was being watched.

public FileChangeEvent.Type

Returns:

the type of event
getType
()

Get the type of event.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileback to summary
private final File file
typeback to summary
private final FileChangeEvent.Type type

Constructor Detail

FileChangeEventback to summary
public FileChangeEvent(File file, FileChangeEvent.Type type)

Construct a new instance.

Parameters
file:File

the file which is being watched

type:FileChangeEvent.Type

the type of event that was encountered

Method Detail

getFileback to summary
public File getFile()

Get the file which was being watched.

Returns:File

the file which was being watched

getTypeback to summary
public FileChangeEvent.Type getType()

Get the type of event.

Returns:FileChangeEvent.Type

the type of event

org.xnio back to summary

public final Enum FileChangeEvent.Type

extends Enum<FileChangeEvent.Type>
Class Inheritance

Watched file event types. More may be added in the future.

Field Summary

Modifier and TypeField and Description
public static final FileChangeEvent.Type
ADDED

A file was added in a directory.

public static final FileChangeEvent.Type
MODIFIED

A file was modified in a directory.

public static final FileChangeEvent.Type
REMOVED

A file was removed from a directory.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static FileChangeEvent.Type
public static FileChangeEvent.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDEDback to summary
public static final FileChangeEvent.Type ADDED

A file was added in a directory.

MODIFIEDback to summary
public static final FileChangeEvent.Type MODIFIED

A file was modified in a directory.

REMOVEDback to summary
public static final FileChangeEvent.Type REMOVED

A file was removed from a directory.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static FileChangeEvent.Type valueOf(String name)
valuesback to summary
public static FileChangeEvent.Type[] values()