Correction to previous post:

The open() does not belong in IOUtils, only the close().

The open() would only apply to commands that operate on files, although in some cases this could be difficult to determine [streams or extended attributes files].

An example of open() in the STOR command:

public class STOR extends AbstractCommand {
  ...
  try {
    // access or allocate the file object
    file = session.getFileSystemView().getFileObject(fileName);

    // open the file
    file.open();
  } catch (Exception) {
    // do something
  }
  ...
}

Andy Thomson

Reply via email to