ios - How to sort GTLQueryDrive items by folders first, name, size, date -


to items, this:

gtlquerydrive *query = [gtlquerydrive queryforfileslist]; query.q = [nsstring stringwithformat:@"'%@' in parents , trashed=false", folderid]; query.fields = @"files(mimetype, id, name, size, createdtime)"; [self.service executequery:query completionhandler:^(gtlserviceticket *ticket, gtldrivefilelist *files,       nserror *error) { }]; 

but files , folders scattered , not sorted name. how without manually sorting?

thank answers.

based thread, can use orderby query parameter has value of string order documents list feed criteria or keys. valid keys createddate, folder, lastviewedbymedate, modifiedbymedate, modifieddate, quotabytesused, recency, sharedwithmedate, starred, , title. each key sorts ascending default, may reversed desc modifier.

example usage: ?orderby=folder,modifieddate desc,title. please note there current limitation users approximately 1 million files in requested sort order ignored.

you can check these related questions:


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -