From 96afa8bd2ba44d6669949db5fce4fee5f826b753 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 28 Feb 2014 19:02:23 +0100 Subject: command: add command "listfiles" Lists files and directories. Supports storage plugins. --- src/command/DatabaseCommands.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/command/DatabaseCommands.cxx') 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 @@ -31,6 +31,18 @@ #include "SongFilter.hxx" #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[]) { @@ -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); } -- cgit v1.2.3