aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-14 11:10:51 +0200
committerMax Kellermann <max@duempel.org>2008-10-14 11:10:51 +0200
commitf521c12d2022f13d3d15408ba320cde77a646363 (patch)
tree583380560ef28e73ab781f063f486451d2e13ade /src
parent5b71d5f6f707a35a7b7a47b33ef2e1417ea6bcc6 (diff)
downloadmpd-f521c12d2022f13d3d15408ba320cde77a646363.tar.gz
mpd-f521c12d2022f13d3d15408ba320cde77a646363.tar.xz
mpd-f521c12d2022f13d3d15408ba320cde77a646363.zip
ls: removed myStat(), isFile(), isDir()
The mapper code has replaced these functions.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c47
-rw-r--r--src/ls.h6
2 files changed, 0 insertions, 53 deletions
diff --git a/src/ls.c b/src/ls.c
index a27bc821c..3683881ad 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -21,7 +21,6 @@
#include "path.h"
#include "client.h"
#include "log.h"
-#include "utf8.h"
#include "utils.h"
#include "list.h"
#include "os_compat.h"
@@ -181,39 +180,6 @@ int lsPlaylists(struct client *client, const char *utf8path)
return 0;
}
-int myStat(const char *utf8file, struct stat *st)
-{
- char path_max_tmp[MPD_PATH_MAX];
- const char *file = utf8_to_fs_charset(path_max_tmp, utf8file);
- const char *actualFile = file;
-
- if (actualFile[0] != '/')
- actualFile = rmp2amp_r(path_max_tmp, file);
-
- return stat(actualFile, st);
-}
-
-int isFile(const char *utf8file, time_t * mtime)
-{
- struct stat st;
-
- if (myStat(utf8file, &st) == 0) {
- if (S_ISREG(st.st_mode)) {
- if (mtime)
- *mtime = st.st_mtime;
- return 1;
- } else {
- DEBUG("isFile: %s is not a regular file\n", utf8file);
- return 0;
- }
- } else {
- DEBUG("isFile: failed to stat: %s: %s\n", utf8file,
- strerror(errno));
- }
-
- return 0;
-}
-
/* suffixes should be ascii only characters */
const char *getSuffix(const char *utf8file)
{
@@ -228,19 +194,6 @@ const char *getSuffix(const char *utf8file)
return ret;
}
-int isDir(const char *utf8name)
-{
- struct stat st;
-
- if (myStat(utf8name, &st) == 0) {
- if (S_ISDIR(st.st_mode)) {
- return 1;
- }
- }
-
- return 0;
-}
-
struct decoder_plugin *hasMusicSuffix(const char *utf8file, unsigned int next)
{
struct decoder_plugin *ret = NULL;
diff --git a/src/ls.h b/src/ls.h
index 0eed1fe14..77af6168a 100644
--- a/src/ls.h
+++ b/src/ls.h
@@ -34,14 +34,8 @@ int isValidRemoteUtf8Url(const char *utf8url);
int isRemoteUrl(const char *url);
-int myStat(const char *utf8file, struct stat *st);
-
-int isDir(const char *utf8name);
-
struct decoder_plugin *hasMusicSuffix(const char *utf8file, unsigned int next);
int printRemoteUrlHandlers(struct client *client);
-int isFile(const char *utf8file, time_t * mtime);
-
#endif