Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
from pathlib import Path
|
||||
|
||||
for path in Path('.').rglob('*.*'):
|
||||
print(path)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import fnmatch
|
||||
import os
|
||||
|
||||
rootPath = '/'
|
||||
pattern = '*.mp3'
|
||||
|
||||
for root, dirs, files in os.walk(rootPath):
|
||||
for filename in fnmatch.filter(files, pattern):
|
||||
print( os.path.join(root, filename))
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
from fnmatch import fnmatch
|
||||
import os, os.path
|
||||
|
||||
def print_fnmatches(pattern, dir, files):
|
||||
for filename in files:
|
||||
if fnmatch(filename, pattern):
|
||||
print os.path.join(dir, filename)
|
||||
|
||||
os.path.walk('/', print_fnmatches, '*.mp3')
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
from path import path
|
||||
|
||||
rootPath = '/'
|
||||
pattern = '*.mp3'
|
||||
|
||||
d = path(rootPath)
|
||||
for f in d.walkfiles(pattern):
|
||||
print f
|
||||
Loading…
Add table
Add a link
Reference in a new issue