Skip to main content
1-Visitor
February 11, 2014
Question

Deleting a file after editing

  • February 11, 2014
  • 1 reply
  • 687 views
Using Arbortext Editor 6.0 M040 and C#:

We have a need to delete the file Arbortext uses during an editing session after editing is complete (the contents are stored in a database, so the disk file is only needed while actually editing). Toward that end, we have set up a listener for the DocumentClosed event. Our problem is that Arbortext doesn't appear to release the file until after the event listener has finished processing the event, meaning that when we try to delete the file we get a "File is in use by another process" error. Can anyone help?

    1 reply

    18-Opal
    February 11, 2014
    Hi Ed--

    Maybe you could try using the event callback to trigger a delayed function, which would give Arbortext a chance to finalize the file before the deletion happens. In ACL, you would use timer_add_callback(); in Java you might use Thread.sleep() or something similar.

    --Clay