Can os.remove followed by os.path.isfile disagree?

Roger Upole rupole at hotmail.com
Wed Jun 6 13:30:23 EDT 2007


ppaterson at gmail.com wrote:
> Can os.path.isfile(x) ever return True after os.remove(x) has
> successfully completed? (Windows 2003,  Python 2.3)

Yes.  If another application has opened the file with FILE_SHARE_DELETE,
os.remove succeeds but the file doesn't actually disappear until the last open
handle to it is closed.

          Roger




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----



More information about the Python-list mailing list