Hi Jean.
On 10/24/08 10:11, Jean McCormack wrote:
> Jack Schwartz wrote:
>> Hi Jean.
>>> Karen,
>>>
>>> is shutil.rmtree() a lot faster than an rm -rf? Just curious for
>>> future reference.
>> rmtree() will be more streamlined. os.system("rm -rf *") will have
>> to create a shell then execute the rm command from within, whereas
>> shutil.rmtree() may just execute system calls directly from C code.
>> It's a leaner, meaner deleting machiner. :)
>>
>> Also, I can probably get rid of my special . and .. processing,
>> condensing several lines of python code down to one. This improves
>> readability and makes for better code.
>>
>> I forgot about shutil.rmtree in my implementation, so I'm planning on
>> changing my code to use it.
>>
>> Thanks,
>> Jack
>>>
>>
> I'm thinking about using it for the cleanup of the pkg_image area. We
> can do zfs rollback to empty for zfs but need something else if you
> don't have a zfs dir.
>
Sounds like a perfect fit to me :)
> Jean
>