Update of /cvsroot/freevo/freevo/src/util
In directory sc8-pr-cvs1:/tmp/cvs-serv13719
Modified Files:
fileops.py
Log Message:
add helper to get all subdirs recursive
Index: fileops.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util/fileops.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** fileops.py 31 Dec 2003 16:43:49 -0000 1.10
--- fileops.py 3 Jan 2004 17:41:01 -0000 1.11
***************
*** 11,20 ****
# -----------------------------------------------------------------------
# $Log$
# Revision 1.10 2003/12/31 16:43:49 dischi
# major speed enhancements
#
- # Revision 1.9 2003/12/30 15:28:34 dischi
- # support for OVERLAY_DIR_STORE_THUMBNAILS
- #
# Revision 1.8 2003/12/12 19:11:20 dischi
# rewrote find_matches. It's not 100% correct because it doesn't use splitext
--- 11,20 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.11 2004/01/03 17:41:01 dischi
+ # add helper to get all subdirs recursive
+ #
# Revision 1.10 2003/12/31 16:43:49 dischi
# major speed enhancements
#
# Revision 1.8 2003/12/12 19:11:20 dischi
# rewrote find_matches. It's not 100% correct because it doesn't use splitext
***************
*** 276,279 ****
--- 276,293 ----
+ def get_subdirs_recursively(dir):
+ """
+ get all subdirectories recursively in the given directory
+ """
+ all_files = []
+ os.path.walk(dir, match_files_recursively_helper, all_files)
+
+ matches = misc.unique([f for f in all_files if os.path.isdir(f) ])
+
+ matches.sort(lambda l, o: cmp(l.upper(), o.upper()))
+
+ return matches
+
+
def recursefolders(root, recurse=0, pattern='*', return_folders=0):
"""
***************
*** 423,431 ****
data = pickle.load(f)
f.close()
- if not config.OVERLAY_DIR_STORE_THUMBNAILS:
- try:
- os.utime(file, None)
- except OSError:
- _debug_('can change access time for %s' % file)
return data
except:
--- 437,440 ----
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog