This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brian.curtin, chris.jerdonek, jeremy.kloth, jkloth, loewis, ncoghlan, pitrou, tim.golden
Date 2012-08-02.14:10:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343916459.3368.1.camel@localhost.localdomain>
In-reply-to <CAGvrs3K4eyYUrL6dSEJhAqJd92ypj19h6tEkGQhQMGoC3Z97dg@mail.gmail.com>
Content
> > I wonder why it couldn't use os.listdir to find out whether the directory is empty, and os.stat to find out whether a specific file or directory still exists.
> 
> It is possible to do the same thing with just os.listdir.  The use of
> the Find*File functions was chosen to eliminate duplicating the wait
> function for the two different cases.  Also,  it is just less resource
> and time intensive to use the Find*File API directly (no need to build
> an entire list when just testing if any entries exist).

But it's certainly much easier to maintain using regular Python APIs. We
would use ctypes if the functionality wasn't accessible from pure
Python, but since it is, we don't want to reinvent the wheel.
History
Date User Action Args
2012-08-02 14:10:06pitrousetrecipients: + pitrou, loewis, ncoghlan, tim.golden, jkloth, brian.curtin, jeremy.kloth, chris.jerdonek
2012-08-02 14:10:06pitroulinkissue15496 messages
2012-08-02 14:10:05pitroucreate