Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f521c12d
Commit
f521c12d
authored
Oct 14, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ls: removed myStat(), isFile(), isDir()
The mapper code has replaced these functions.
parent
5b71d5f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
53 deletions
+0
-53
ls.c
src/ls.c
+0
-47
ls.h
src/ls.h
+0
-6
No files found.
src/ls.c
View file @
f521c12d
...
...
@@ -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
;
...
...
src/ls.h
View file @
f521c12d
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment