private boolean createPhotoFolder ( DropboxAPI < AndroidAuthSession > dropboxApi ) { boolean folderCreated = false ; if ( dropboxApi != null ) { try { dropboxApi . createFolder ( mContext . getString ( R . string . wings_dropbox__photo_folder ) ) ; folderCreated = true ; } catch ( DropboxException e ) { // Consider the folder created if the folder already exists. if ( e instanceof DropboxServerException ) { folderCreated = DropboxServerException . _403_FORBIDDEN == ( ( DropboxServerException ) e ) . error ; } } } return folderCreated ; }
Creates a directory for photos if one does not already exist . If the folder already exists this call will do nothing .