samer@4: % music_files - search for audio files under music directory samer@4: % samer@4: % music_files :: samer@4: % string ~'Path based at ~/Music' samer@4: % options { samer@4: % pattern :: string/'*' ~'filename matching patter'; samer@4: % rec :: bool/0 ~'recurse into subdirs?' samer@4: % } samer@4: % -> cells {string}. samer@4: % samer@4: % This function assumes that the HOME environment variable points to the samer@4: % user's home directory and that there exists there a directory called 'Music'. samer@4: samer@4: function L=music_files(d,varargin) samer@4: L=listfiles([getenv('HOME'),filesep,'Music',filesep,d],'regexp','.*\.(mp3|ogg|m4a|wav|au|flac)',varargin{:});