delete will assure file is deleted?

Mike Meyer mwm at mired.org
Tue Apr 26 06:21:45 EDT 2005


"ajikoe at gmail.com" <ajikoe at gmail.com> writes:

> Hello,
>
> If I use os.remove(fileName), does it always assure that the code will
> move to the next code only if the fileName is deleted completely?

Hmm. The documdentation doesn't say. A quick test on FreeBSD shows
that if you don't have permission to remove the file, an exception is
raised. A second test shows that you get a the same exception if the
file doesn't exist.

Things in os tend to be tied tightly to the underlying platform. You
might want to test on your platform.

      <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list