Skip to content

Commit 8674770

Browse files
committed
Add lsinfo command.
1 parent 148ef03 commit 8674770

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/client.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<S: Read + Write> Client<S> {
427427
// Database search {{{
428428
// TODO: count tag needle [...] [group] [grouptag], find type what [...] [window start:end]
429429
// TODO: search type what [...] [window start:end], searchadd type what [...]
430-
// TODO: listallinfo [uri], listfiles [uri], lsinfo [uri]
430+
// TODO: listallinfo [uri], listfiles [uri]
431431
// TODO: list type [filtertype] [filterwhat] [...] [group] [grouptype] [...]
432432
// TODO: searchaddpl name type what [...], readcomments
433433

@@ -469,6 +469,12 @@ impl<S: Read + Write> Client<S> {
469469
.and_then(|_| self.expect_ok())
470470
}
471471

472+
/// Lists the contents of a directory.
473+
pub fn lsinfo<P: ToSongPath>(&mut self, path: P) -> Result<Song> {
474+
self.run_command("lsinfo", path)
475+
.and_then(|_| self.read_struct())
476+
}
477+
472478
// }}}
473479

474480
// Output methods {{{

0 commit comments

Comments
 (0)