I have a python action to move a file from the local library to the dropbox library. It uses editor.set_file_contents() to create the copy in Dropbox, and then os.remove() to delete the local file, followed by editor.reload_files() to update the library.
Everything seems to work (ie the file is moved as expected), but a file with that name/contents is open in the editor. If anything changes with this file, it's written back to its original location as a new copy. Is there any way to clear the editor contents or close the file?
The only workaround I can think of is to have a scratch file that I open after the above steps to discard the current contents, but I was wondering if there was something cleaner.
Thanks,
Ed