whatmp3.py 文件源码

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

项目:atoolbox 作者: liweitianux 项目源码 文件源码
def copy_other(opts, flacdir, outdir):
    if opts.verbose:
        print('COPYING other files')
    for dirpath, dirs, files in os.walk(flacdir, topdown=False):
        for name in files:
            if opts.nolog and fnmatch(name.lower(), '*.log'):
                continue
            if opts.nocue and fnmatch(name.lower(), '*.cue'):
                continue
            if opts.nodots and fnmatch(name.lower(), '^.'):
                continue
            if (not fnmatch(name.lower(), '*.flac')
               and not fnmatch(name.lower(), '*.m3u')):
                d = re.sub(re.escape(flacdir), outdir, dirpath)
                if (os.path.exists(os.path.join(d, name))
                   and not opts.overwrite):
                    continue
                if not os.path.exists(d):
                    os.makedirs(d)
                shutil.copy(os.path.join(dirpath, name), d)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号