directory-walk Questions

17

Solved

I feel that assigning files, and folders and doing the += [item] part is a bit hackish. Any suggestions? I'm using Python 3.2 from os import * from os.path import * def dir_contents(path): con...
Florance asked 10/7, 2011 at 5:31

5

Solved

I'm messing around with file lookups in python on a large hard disk. I've been looking at os.walk and glob. I usually use os.walk as I find it much neater and seems to be quicker (for usual size di...
Hussy asked 19/1, 2012 at 18:10

3

Solved

I'm looking for a lib which would provide a method which would give me a list of files matching given Ant-like pattern. For *foo/**/*.txt I'd get foo/x.txt foo/bar/baz/.txt myfoo/baz/boo/bar.txt ...
Keppel asked 4/6, 2013 at 17:23

5

I'm working on a job that processes a nested directory structure, containing files on multiple levels: one/ ├── three/ │   └── four/ │   ├── baz.txt │   ├── bleh.txt │   └── foo.txt └── two/ ├── ...
Madai asked 18/4, 2012 at 13:44

10

Solved

I am trying to process files one at a time that are stored over a network. Reading the files is fast due to buffering is not the issue. The problem I have is just listing the directories in a folde...
Bassorilievo asked 10/12, 2008 at 0:14

8

Solved

I want to get a list of all the subdirectories and my below code works except when I have readonly permissions on certain folders. In the below question it shows how to skip a directory with Recu...
Transhumance asked 19/1, 2013 at 3:46

4

Solved

I need a file system walker that I could instruct to ignore traversing directories that I want to leave untouched, including all subdirectories below that branch. The os.walk and os.path.walk just ...
Rafaelita asked 29/5, 2009 at 8:52

2

Solved

foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(".")) as $file) { echo "$file\n"; } Is there any way for this code to not throw UnexpectedValueException "failed to open dir:...
Divot asked 28/12, 2010 at 16:22

5

Solved

I am using glib in my application, and I see there are convenience wrappers in glib for C's remove, unlink and rmdir. But these only work on a single file or directory at a time. As far as I can s...
Soap asked 7/2, 2010 at 17:18
1

© 2022 - 2024 — McMap. All rights reserved.