aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-31 22:32:44 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-31 22:32:44 +0000
commit795a1e930b6d3d606546689e991149b9ad583066 (patch)
treebee338e390d2a971f667acba81cadf26d2c2c685 /src/ls.c
parent995a5deb285385417bc7d6ab182313088c62b9ca (diff)
downloadmpd-795a1e930b6d3d606546689e991149b9ad583066.tar.gz
mpd-795a1e930b6d3d606546689e991149b9ad583066.tar.xz
mpd-795a1e930b6d3d606546689e991149b9ad583066.zip
lets cleanup some file type detection and not call stat() so much
git-svn-id: https://svn.musicpd.org/mpd/trunk@575 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/ls.c b/src/ls.c
index 38aaebe40..a47f64d74 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -155,58 +155,28 @@ int hasWaveSuffix(char * utf8file) {
return hasSuffix(utf8file,"wav");
}
-int isWave(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasWaveSuffix(utf8file);
- return 0;
-}
-
int hasFlacSuffix(char * utf8file) {
return hasSuffix(utf8file,"flac");
}
-int isFlac(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasFlacSuffix(utf8file);
- return 0;
-}
-
int hasOggSuffix(char * utf8file) {
return hasSuffix(utf8file,"ogg");
}
-int isOgg(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasOggSuffix(utf8file);
- return 0;
-}
-
int hasAacSuffix(char * utf8file) {
return hasSuffix(utf8file,"aac");
}
-int isAac(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasAacSuffix(utf8file);
- return 0;
-}
-
int hasMp4Suffix(char * utf8file) {
if(hasSuffix(utf8file,"mp4")) return 1;
if(hasSuffix(utf8file,"m4a")) return 1;
return 0;
}
-int isMp4(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasMp4Suffix(utf8file);
- return 0;
-}
-
int hasMp3Suffix(char * utf8file) {
return hasSuffix(utf8file,"mp3");
}
-int isMp3(char * utf8file, time_t * mtime) {
- if(isFile(utf8file,mtime)) return hasMp3Suffix(utf8file);
- return 0;
-}
-
int isDir(char * utf8name, time_t * mtime) {
struct stat st;