Libmpc.Mpc.Find C# (CSharp) Method

Find() public method

Returns all files in the database who's attribute matches the given tokens. Works like the Search command but is case sensitive.
public Find ( string>.Dictionary search ) : List
search string>.Dictionary The values the files attribute must have to be included in the result.
return List
        public List<MpdFile> Find(Dictionary<ScopeSpecifier, string> search)
        {
            if (search == null)
            throw new ArgumentNullException("search");

              string[] args = new string[search.Keys.Count * 2];
              int index = 0;
              foreach (ScopeSpecifier k in search.Keys) {
            string token = EscapeString(search[k]);
            args[index++] = this.toTag(k);
            args[index++] = token;
              }
              MpdResponse response = this.getConnection().Exec("find", args);

              if (response.IsError)
            throw new MpdResponseException(response.ErrorCode, response.ErrorMessage);

              return MpdFile.buildList(response);
        }

Same methods

Mpc::Find ( ScopeSpecifier scopeSpecifier, string token ) : List