Mercurial > hg > ishara
annotate general/fileutils/music_files.m @ 19:1eb0ea29ec40
Doesn't belong here.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:32:19 +0000 |
parents | e44f49929e56 |
children |
rev | line source |
---|---|
samer@4 | 1 % music_files - search for audio files under music directory |
samer@4 | 2 % |
samer@4 | 3 % music_files :: |
samer@4 | 4 % string ~'Path based at ~/Music' |
samer@4 | 5 % options { |
samer@4 | 6 % pattern :: string/'*' ~'filename matching patter'; |
samer@4 | 7 % rec :: bool/0 ~'recurse into subdirs?' |
samer@4 | 8 % } |
samer@4 | 9 % -> cells {string}. |
samer@4 | 10 % |
samer@4 | 11 % This function assumes that the HOME environment variable points to the |
samer@4 | 12 % user's home directory and that there exists there a directory called 'Music'. |
samer@4 | 13 |
samer@4 | 14 function L=music_files(d,varargin) |
samer@4 | 15 L=listfiles([getenv('HOME'),filesep,'Music',filesep,d],'regexp','.*\.(mp3|ogg|m4a|wav|au|flac)',varargin{:}); |