utils.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:script.skin.helper.skinbackup 作者: marcelveldt 项目源码 文件源码
def recursive_delete_dir(fullpath):
    '''helper to recursively delete a directory'''
    success = True
    if not isinstance(fullpath, unicode):
        fullpath = fullpath.decode("utf-8")
    dirs, files = xbmcvfs.listdir(fullpath)
    for file in files:
        file = file.decode("utf-8")
        success = xbmcvfs.delete(os.path.join(fullpath, file))
    for directory in dirs:
        directory = directory.decode("utf-8")
        success = recursive_delete_dir(os.path.join(fullpath, directory))
    success = xbmcvfs.rmdir(fullpath)
    return success
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号