Package net.rubygrapefruit.platform.internal

# Class DefaultFileEvents

java.lang.Object
net.rubygrapefruit.platform.internal.DefaultFileEvents

All Implemented Interfaces:
  `FileEvents`, `NativeIntegration`

public class DefaultFileEvents extends Object implements FileEvents

## Constructor Summary

Constructors
Constructor
Description
`DefaultFileEvents()`

## Method Summary

Modifier and Type
Method
Description
`FileWatch`
`startWatch(File target)`
Starts watching the specified directory or file.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultFileEvents

public DefaultFileEvents()

## Method Details

### startWatch

public FileWatch startWatch(File target) throws NativeException
Description copied from interface: `FileEvents`
Starts watching the specified directory or file.

Caller should call `FileWatch.close()` when finished watching to release any resources.

Note: The current implementation does not notify about changes to files in a directory, only the directory itself. This means events will be received when files are created or deleted in the directory, but not when files in the directory are modified.

Specified by:
  `startWatch` in interface `FileEvents`
Throws:
  `NativeException`