public /*@Nullable*/ String createCopyRef ( String path ) throws DbxException { DbxPathV1 . checkArgNonRoot ( "path" , path ) ; String apiPath = "1/copy_ref/auto" + path ; return doPost ( host . getApi ( ) , apiPath , null , null , new DbxRequestUtil . ResponseHandler < /*@Nullable*/ String > ( ) { @ Override public /*@Nullable*/ String handle ( HttpRequestor . Response response ) throws DbxException { if ( response . getStatusCode ( ) == 404 ) return null ; if ( response . getStatusCode ( ) != 200 ) throw DbxRequestUtil . unexpectedStatus ( response ) ; CopyRef copyRef = DbxRequestUtil . readJsonFromResponse ( CopyRef . Reader , response ) ; return copyRef . id ; } } ) ; }
Creates and returns a copy ref to a file . A copy ref can be used to copy a file across different Dropbox accounts without downloading and re - uploading .