2012-06-08 6 views
0

Dropbox API (Spring.Social.DropBox 사용)를 성공적으로 설정하고 프로그래밍 방식으로 내 보관 용 폴더를 검색하려고합니다. 둘 이상의 파일 형식을 반환 할 수있는 쿼리는 어떻게 지정합니까? QUERTY이 (.png를, .txt)로 하나의 파일 형식을 지정하는 경우보관 용 계정 API에서 검색 쿼리 지정하기

DropboxServiceProvider ^dropboxServiceProvider = gcnew Spring::Social::Dropbox::Connect::DropboxServiceProvider(appKey, appSecret, Spring::Social::Dropbox::Api::AccessLevel::AppFolder); 
IDropbox ^dropboxApi = dropboxServiceProvider->GetApi(myAccessToken, myAccessSecret); 

System::String ^pth = "TestFolder"; 
System::String ^qry = ".txt"; 
System::Collections::Generic::IList<Spring::Social::Dropbox::Api::Entry^> ^results = dropboxApi->Search(pth, qry); 

위의 코드는 작동합니다. 하지만 여러 파일 형식을 검색하는 쿼리를 작성하려면 어떻게해야합니까? 시도했습니다.

System::String ^qry = ".txt;.png"; 
System::String ^qry = ".{txt|png}"; 
System::String ^qry = ".txt?.png"; 

어떻게하면 좋을까요?

답변

0

현재 Dropbox API는 정규식 쿼리 또는 이와 유사한 부울 연산자를 지원하지 않으므로 현재로서는 불가능합니다. 주어진 이름의 모든 파일 또는 주어진 유형의 모든 파일을 각각의 이름이나 유형을 검색하여 가져올 수 있지만 단일 호출에서 여러 값을 검색 할 수는 없습니다. (한 가지 해결 방법은 관련 통화를 만들고 결과를 함께 결합하는 것일 수 있습니다.)

관련 문제