question: private void synchronizeData ( ArrayList < Object > folderAndFiles , OwnCloudClient client ) throws OperationCancelledException { FileDataStorageManager storageManager = getStorageManager ( ) ; OCFile remoteFolder = FileStorageUtils . fillOCFile ( ( RemoteFile ) folderAndFiles . get ( 0 ) ) ; remoteFolder . setParentId ( mLocalFolder . getParentId ( ) ) ; remoteFolder . setFileId ( mLocalFolder . getFileId ( ) ) ; Log_OC . d ( TAG , "Remote folder " + mLocalFolder . getRemotePath ( ) + " changed - starting update of local data " ) ; List < OCFile > updatedFiles = new Vector < OCFile > ( folderAndFiles . size ( ) - 1 ) ; mFilesForDirectDownload . clear ( ) ; mFilesToSyncContents . clear ( ) ; if ( mCancellationRequested . get ( ) ) { throw new OperationCancelledException ( ) ; } List < OCFile > localFiles = storageManager . getFolderContent ( mLocalFolder ) ; Map < String , OCFile > localFilesMap = new HashMap < String , OCFile > ( localFiles . size ( ) ) ; for ( OCFile file : localFiles ) { localFilesMap . put ( file . getRemotePath ( ) , file ) ; } OCFile remoteFile , localFile , updatedFile ; RemoteFile r ; for ( int i = 1 ; i < folderAndFiles . size ( ) ; i ++ ) { r = ( RemoteFile ) folderAndFiles . get ( i ) ; remoteFile = FileStorageUtils . fillOCFile ( r ) ; updatedFile = FileStorageUtils . fillOCFile ( r ) ; updatedFile . setParentId ( mLocalFolder . getFileId ( ) ) ; localFile = localFilesMap . remove ( remoteFile . getRemotePath ( ) ) ; updatedFile . setLastSyncDateForProperties ( mCurrentSyncTime ) ; if ( localFile != null ) { updatedFile . setFileId ( localFile . getFileId ( ) ) ; updatedFile . setFavorite ( localFile . isFavorite ( ) ) ; updatedFile . setLastSyncDateForData ( localFile . getLastSyncDateForData ( ) ) ; updatedFile . setModificationTimestampAtLastSyncForData ( localFile . getModificationTimestampAtLastSyncForData ( ) ) ; updatedFile . setStoragePath ( localFile . getStoragePath ( ) ) ; updatedFile . setEtag ( localFile . getEtag ( ) ) ; if ( updatedFile . isFolder ( ) ) { updatedFile . setFileLength ( localFile . getFileLength ( ) ) ; } else if ( mRemoteFolderChanged && remoteFile . isImage ( ) && remoteFile . getModificationTimestamp ( ) != localFile . getModificationTimestamp ( ) ) { updatedFile . setNeedsUpdateThumbnail ( true ) ; Log . d ( TAG , "Image " + remoteFile . getFileName ( ) + " updated on the server" ) ; } updatedFile . setPublicLink ( localFile . getPublicLink ( ) ) ; updatedFile . setShareViaLink ( localFile . isSharedViaLink ( ) ) ; updatedFile . setShareWithSharee ( localFile . isSharedWithSharee ( ) ) ; updatedFile . setEtagInConflict ( localFile . getEtagInConflict ( ) ) ; } else { updatedFile . setEtag ( "" ) ; } searchForLocalFileInDefaultPath ( updatedFile ) ; if ( remoteFile . isFolder ( ) ) { synchronized ( mCancellationRequested ) { if ( mCancellationRequested . get ( ) ) { throw new OperationCancelledException ( ) ; } startSyncFolderOperation ( remoteFile . getRemotePath ( ) ) ; } } else { SynchronizeFileOperation operation = new SynchronizeFileOperation ( localFile , remoteFile , mAccount , true , mContext ) ; mFilesToSyncContents . add ( operation ) ; } updatedFiles . add ( updatedFile ) ; } storageManager . saveFolder ( remoteFolder , updatedFiles , localFilesMap . values ( ) ) ; }
target:  Synchronizes the data retrieved from the server about the contents of the target folder with the current data in the local database. Grants that mChildren is updated with fresh data after execution.