I am working on an Adobe AIR development on Windows and I need to copy some files to a new location, where an external app will be doing some manipulation over the images.
I am doing this to copy an image to another location:
File(srcFile).copyTo(dstFile, true); //overwrite is true
However, sometimes the copyTo method throws this error:
Error #3012 "Cannot delete file or directory." at flash.filesystem::File/copyTo()
Adobe documentation says:
On Windows, you cannot copy a file that is open or a directory that contains a file that is open.
Maybe the external app still has the "dstFile" opened when I try to copy a new file... so I wonder how can I know whether a File is opened or not? Is there any FileSystem event what I could listen to?
Has anyone had this issue before? How did you solve it?
Thanks in advanced