diff options
author | Max Kellermann <max@duempel.org> | 2014-02-28 19:02:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-01 06:25:57 +0100 |
commit | 96afa8bd2ba44d6669949db5fce4fee5f826b753 (patch) | |
tree | a484d32c412b2cb716cc149a42f702e8c3013f48 /src/command/DatabaseCommands.cxx | |
parent | 797bbeabeb212ee3d818acdb19d85e2d8642f5ed (diff) | |
download | mpd-96afa8bd2ba44d6669949db5fce4fee5f826b753.tar.gz mpd-96afa8bd2ba44d6669949db5fce4fee5f826b753.tar.xz mpd-96afa8bd2ba44d6669949db5fce4fee5f826b753.zip |
command: add command "listfiles"
Lists files and directories. Supports storage plugins.
Diffstat (limited to 'src/command/DatabaseCommands.cxx')
-rw-r--r-- | src/command/DatabaseCommands.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index 9d00698c6..96ea357bc 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -32,6 +32,18 @@ #include "protocol/Result.hxx" CommandResult +handle_listfiles_db(Client &client, const char *uri) +{ + const DatabaseSelection selection(uri, false); + + Error error; + if (!db_selection_print(client, selection, false, true, error)) + return print_error(client, error); + + return CommandResult::OK; +} + +CommandResult handle_lsinfo2(Client &client, int argc, char *argv[]) { const char *const uri = argc == 2 @@ -42,7 +54,7 @@ handle_lsinfo2(Client &client, int argc, char *argv[]) const DatabaseSelection selection(uri, false); Error error; - if (!db_selection_print(client, selection, true, error)) + if (!db_selection_print(client, selection, true, false, error)) return print_error(client, error); return CommandResult::OK; @@ -60,7 +72,7 @@ handle_match(Client &client, int argc, char *argv[], bool fold_case) const DatabaseSelection selection("", true, &filter); Error error; - return db_selection_print(client, selection, true, error) + return db_selection_print(client, selection, true, false, error) ? CommandResult::OK : print_error(client, error); } |