コード例 #1
0
ファイル: filters.py プロジェクト: m00n/filelegend
def make_path_props(p):
    props = {
        'hidden': p.name.startswith('.'),
        'hiddenfile': p.name.startswith('.') and p.isfile(),
        'hiddendir': p.name.startswith('.') and p.isdir(),
        'size': p.size,
        'name': p.name,
        'ext': p.ext,
        'file': p.isfile(),
        'dir': p.isdir(),
        'image': ThumbDB.can_load(p),
        'path': p,
    }
    return props