public /*@Nullable*/ DbxEntry getMetadata ( final String path , boolean includeMediaInfo ) throws DbxException { DbxPathV1 . checkArg ( "path" , path ) ; String host = this . host . getApi ( ) ; String apiPath = "1/metadata/auto" + path ; /*@Nullable*/ String [ ] params = { "list" , "false" , "include_media_info" , includeMediaInfo ? "true" : null , } ; return doGet ( host , apiPath , params , null , new DbxRequestUtil . ResponseHandler < /*@Nullable*/ DbxEntry > ( ) { @ Override public /*@Nullable*/ DbxEntry handle ( HttpRequestor . Response response ) throws DbxException { if ( response . getStatusCode ( ) == 404 ) return null ; if ( response . getStatusCode ( ) != 200 ) throw DbxRequestUtil . unexpectedStatus ( response ) ; // Will return 'null' for "is_deleted=true" entries. return DbxRequestUtil . readJsonFromResponse ( DbxEntry . ReaderMaybeDeleted , response ) ; } } ) ; }
Get the file or folder metadata for a given path .