The file system Connector is a transport Connector that requires a Parser to operate. The file system Connector reads and writes files available on the system it runs on. Concurrent usage of a file can be controlled by means of a locking mechanism.
This Connector can only be used in Iterator or AddOnly mode, or for the equivalent operations in Passive state.
The Connector needs the following parameters:
If we have requested a lock on the file (using the Lock File parameter), the Timeout parameter instead specifies how long to wait to acquire the lock. An unspecified or negative number means "wait forever".
The lock is acquired when the Connector is initialized, and released when the Connector is closed.
If one Connector (A) has acquired an exclusive lock on a file, and another Connector (B) tries to open it, then Connector B will either wait for he lock to be released, or an error will be thrown. If Connector B has checked the exclusive Lock parameter, it will wait; if Connector B has not checked the exclusive Lock parameter, an error will be thrown.
The locking mechanism is Operating System dependent. Note that file locking can cause deadlocks, especially if more than one file is locked per AssemblyLine.
For more information, see http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#lock()