diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index 2bc277136b9..32883dd3713 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -3038,7 +3038,7 @@ nsChromeRegistry::CheckForNewChrome() } } PR_Close(file); - // listFile->Delete(PR_FALSE); + // listFile->Remove(PR_FALSE); return rv; } @@ -3223,7 +3223,7 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const PRUnichar * nsCOMPtr userChromeDir; rv = NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(userChromeDir)); if (NS_SUCCEEDED(rv) && userChromeDir) - rv = userChromeDir->Delete(PR_TRUE); + rv = userChromeDir->Remove(PR_TRUE); } } else if (!nsCRT::strcmp(NS_LITERAL_STRING("profile-do-change").get(), aTopic)) { diff --git a/mozilla/embedding/browser/photon/src/WebBrowserContainer.cpp b/mozilla/embedding/browser/photon/src/WebBrowserContainer.cpp index 0713c864138..b899f8370c2 100644 --- a/mozilla/embedding/browser/photon/src/WebBrowserContainer.cpp +++ b/mozilla/embedding/browser/photon/src/WebBrowserContainer.cpp @@ -455,7 +455,7 @@ NS_IMETHODIMP CWebBrowserContainer::OnStateChange(nsIWebProgress* aWebProgress, fileToUse->Equals( tempFile, &equalToTempFile ); fileToUse->Exists(&filetoUseAlreadyExists); if( filetoUseAlreadyExists && !equalToTempFile ) - fileToUse->Delete(PR_FALSE); + fileToUse->Remove(PR_FALSE); // extract the new leaf name from the file location nsXPIDLCString fileName; diff --git a/mozilla/extensions/cookie/nsCookies.cpp b/mozilla/extensions/cookie/nsCookies.cpp index 5cbd4153068..3df462ae7d9 100644 --- a/mozilla/extensions/cookie/nsCookies.cpp +++ b/mozilla/extensions/cookie/nsCookies.cpp @@ -132,7 +132,7 @@ COOKIE_DeletePersistentUserData(void) if (NS_SUCCEEDED(res)) { res = cookiesFile->Append(kCookiesFileName); if (NS_SUCCEEDED(res)) - (void) cookiesFile->Delete(PR_FALSE); + (void) cookiesFile->Remove(PR_FALSE); } } diff --git a/mozilla/extensions/cookie/nsPermissions.cpp b/mozilla/extensions/cookie/nsPermissions.cpp index 972f490344e..be73a1ecc6c 100644 --- a/mozilla/extensions/cookie/nsPermissions.cpp +++ b/mozilla/extensions/cookie/nsPermissions.cpp @@ -662,7 +662,7 @@ PERMISSION_DeletePersistentUserData(void) if (NS_SUCCEEDED(res)) { res = cookiesPermFile->Append(kCookiesPermFileName); if (NS_SUCCEEDED(res)) - (void) cookiesPermFile->Delete(PR_FALSE); + (void) cookiesPermFile->Remove(PR_FALSE); } } diff --git a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp index a855bb22231..8a39a28d3ee 100644 --- a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp +++ b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp @@ -1960,7 +1960,7 @@ nsMessengerMigrator::migrateAddressBookPrefEnum(const char *aPref, void *aClosur #ifdef DEBUG_AB_MIGRATION printf("remove the tmp file\n"); #endif /* DEBUG_AB_MIGRATION */ - rv = tmpLDIFFile->Delete(PR_TRUE); + rv = tmpLDIFFile->Remove(PR_TRUE); NS_ASSERTION(NS_SUCCEEDED(rv),"failed to delete the temp ldif file"); if (NS_FAILED(rv)) return; diff --git a/mozilla/mailnews/compose/src/nsMsgCompFields.cpp b/mozilla/mailnews/compose/src/nsMsgCompFields.cpp index cd554c176af..c6463311803 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompFields.cpp +++ b/mozilla/mailnews/compose/src/nsMsgCompFields.cpp @@ -157,7 +157,7 @@ nsresult nsMsgCompFields::CleanUpTempFiles() } // remove it if not a dir - urlFile->Delete(PR_FALSE); + urlFile->Remove(PR_FALSE); } token = nsCRT::strtok(rest, ",", &rest); diff --git a/mozilla/mailnews/local/src/nsMovemailService.cpp b/mozilla/mailnews/local/src/nsMovemailService.cpp index 20b6771e209..aa16c4bc383 100644 --- a/mozilla/mailnews/local/src/nsMovemailService.cpp +++ b/mozilla/mailnews/local/src/nsMovemailService.cpp @@ -180,7 +180,7 @@ PRBool ObtainSpoolLock(const char *spoolnameStr, #endif // step 3: remove .mozlock file, in any case - rv = tmplocfile->Delete(PR_FALSE /* non-recursive */); + rv = tmplocfile->Remove(PR_FALSE /* non-recursive */); #ifdef MOVEMAIL_DEBUG if (NS_FAILED(rv)) { // Could not delete our .mozlock file... very unusual, but @@ -225,7 +225,7 @@ PRBool YieldSpoolLock(const char *spoolnameStr) return PR_FALSE; // Delete the file - rv = locklocfile->Delete(PR_FALSE /* non-recursive */); + rv = locklocfile->Remove(PR_FALSE /* non-recursive */); if (NS_FAILED(rv)) return PR_FALSE; diff --git a/mozilla/modules/libjar/nsJAR.cpp b/mozilla/modules/libjar/nsJAR.cpp index 83f61aee716..39bedaf94b0 100644 --- a/mozilla/modules/libjar/nsJAR.cpp +++ b/mozilla/modules/libjar/nsJAR.cpp @@ -270,7 +270,7 @@ nsJAR::Extract(const char *zipEntry, nsIFile* outFile) PR_Close(fd); if (err != ZIP_OK) - outFile->Delete(PR_FALSE); + outFile->Remove(PR_FALSE); else { #if defined(XP_UNIX) diff --git a/mozilla/modules/libpref/src/nsPrefService.cpp b/mozilla/modules/libpref/src/nsPrefService.cpp index 7009c22f16e..95058da088d 100644 --- a/mozilla/modules/libpref/src/nsPrefService.cpp +++ b/mozilla/modules/libpref/src/nsPrefService.cpp @@ -133,7 +133,7 @@ NS_IMETHODIMP nsPrefService::Observe(nsISupports *aSubject, const PRUnichar *aTo if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-before-change").get())) { if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) { if (mCurrentFile) { - mCurrentFile->Delete(PR_FALSE); + mCurrentFile->Remove(PR_FALSE); NS_RELEASE(mCurrentFile); } } else { diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index e1055f87494..f851c7ebbce 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -1088,7 +1088,7 @@ nsPluginStreamInfo::~nsPluginStreamInfo() PR_FALSE, getter_AddRefs(localFile)); if(NS_SUCCEEDED(res)) - localFile->Delete(PR_FALSE); + localFile->Remove(PR_FALSE); } if (mFilePath) PL_strfree(mFilePath); @@ -1455,7 +1455,7 @@ nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer() nsCOMPtr localFile; nsresult res = NS_NewLocalFile(mLocalFile, PR_FALSE, getter_AddRefs(localFile)); if(NS_SUCCEEDED(res)) - localFile->Delete(PR_FALSE); + localFile->Remove(PR_FALSE); delete [] mLocalFile; } delete mDataForwardToRequest; @@ -2806,7 +2806,7 @@ NS_IMETHODIMP nsPluginHostImpl::Destroy(void) rv = pluginTmp->Append(kPluginTmpDirName); if (NS_FAILED(rv)) return rv; - pluginTmp->Delete(PR_TRUE); + pluginTmp->Remove(PR_TRUE); return NS_OK; } diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index e1055f87494..f851c7ebbce 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -1088,7 +1088,7 @@ nsPluginStreamInfo::~nsPluginStreamInfo() PR_FALSE, getter_AddRefs(localFile)); if(NS_SUCCEEDED(res)) - localFile->Delete(PR_FALSE); + localFile->Remove(PR_FALSE); } if (mFilePath) PL_strfree(mFilePath); @@ -1455,7 +1455,7 @@ nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer() nsCOMPtr localFile; nsresult res = NS_NewLocalFile(mLocalFile, PR_FALSE, getter_AddRefs(localFile)); if(NS_SUCCEEDED(res)) - localFile->Delete(PR_FALSE); + localFile->Remove(PR_FALSE); delete [] mLocalFile; } delete mDataForwardToRequest; @@ -2806,7 +2806,7 @@ NS_IMETHODIMP nsPluginHostImpl::Destroy(void) rv = pluginTmp->Append(kPluginTmpDirName); if (NS_FAILED(rv)) return rv; - pluginTmp->Delete(PR_TRUE); + pluginTmp->Remove(PR_TRUE); return NS_OK; } diff --git a/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp b/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp index e60e1e1b37c..3ec7a24271b 100644 --- a/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp +++ b/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp @@ -170,7 +170,7 @@ nsNetDiskCache::~nsNetDiskCache() if( trash.CompareWithConversion( filename, PR_FALSE, 5 ) == 0) - file->Delete( PR_TRUE ); + file->Remove( PR_TRUE ); nsCRT::free(filename) ; } @@ -642,12 +642,12 @@ nsNetDiskCache::RemoveAll(void) return rv ; PRBool isDirectory; if ( NS_SUCCEEDED(file->IsDirectory( &isDirectory )) && isDirectory ) - file->Delete( PR_TRUE ); + file->Remove( PR_TRUE ); } if ( mDBFile ) { - mDBFile->Delete(PR_FALSE) ; + mDBFile->Remove(PR_FALSE) ; if (mDBFile) { PRBool exists = PR_FALSE; diff --git a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp index 622d48064bd..d22461b9c21 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp @@ -287,7 +287,7 @@ nsDiskCacheDevice::Init() nsCOMPtr cacheTrashDir; rv = GetCacheTrashDirectory(getter_AddRefs(cacheTrashDir)); if (NS_FAILED(rv)) goto error_exit; - (void) cacheTrashDir->Delete(PR_TRUE); // ignore errors, we tried... + (void) cacheTrashDir->Remove(PR_TRUE); // ignore errors, we tried... // Try opening cache map file. mCacheMap = new nsDiskCacheMap; @@ -730,7 +730,7 @@ nsDiskCacheDevice::InitializeCacheDirectory() nsresult rv; // recursively delete the disk cache directory. - rv = mCacheDirectory->Delete(PR_TRUE); + rv = mCacheDirectory->Remove(PR_TRUE); if (NS_FAILED(rv)) { // try moving it aside @@ -850,7 +850,7 @@ nsDiskCacheDevice::SetCacheParentDirectory(nsILocalFile * parentDir) rv = directory->Exists(&exists); if (NS_SUCCEEDED(rv) && exists) - (void) directory->Delete(PR_TRUE); + (void) directory->Remove(PR_TRUE); // clean up obsolete NewCache directory rv = parentDir->Clone(getter_AddRefs(directory)); @@ -860,7 +860,7 @@ nsDiskCacheDevice::SetCacheParentDirectory(nsILocalFile * parentDir) rv = directory->Exists(&exists); if (NS_SUCCEEDED(rv) && exists) - (void) directory->Delete(PR_TRUE); + (void) directory->Remove(PR_TRUE); } diff --git a/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp b/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp index c27e5603003..06fda7d34ff 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp @@ -759,7 +759,7 @@ nsDiskCacheMap::DeleteStorage(nsDiskCacheRecord * record, PRBool metaData) rv = GetFileForDiskCacheRecord(record, metaData, getter_AddRefs(file)); if (NS_SUCCEEDED(rv)) { - rv = file->Delete(PR_FALSE); // false == non-recursive + rv = file->Remove(PR_FALSE); // false == non-recursive } DecrementTotalSize(sizeK * 1024); diff --git a/mozilla/netwerk/test/TestFileInput2.cpp b/mozilla/netwerk/test/TestFileInput2.cpp index 3bef0c17f86..2eb749f7f4a 100644 --- a/mozilla/netwerk/test/TestFileInput2.cpp +++ b/mozilla/netwerk/test/TestFileInput2.cpp @@ -385,7 +385,7 @@ Test(CreateFun create, PRUint32 count, if (NS_FAILED(rv)) goto done; if (exists) { - rv = outSpec->Delete(PR_FALSE); + rv = outSpec->Remove(PR_FALSE); if (NS_FAILED(rv)) goto done; } diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index 2bf7c61d97e..37bce7ae829 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -1128,11 +1128,11 @@ nsPrefMigration::ProcessPrefsCallback(const char* oldProfilePathStr, const char PRBool flagExists = PR_FALSE; m_prefsFile->Exists(&flagExists); //Delete the prefs.js file in the temp directory. if (flagExists) - m_prefsFile->Delete(PR_FALSE); + m_prefsFile->Remove(PR_FALSE); systemTempIFileDir->Exists(&flagExists); //Delete the unique dir in the system temp dir. if (flagExists) - systemTempIFileDir->Delete(PR_FALSE); + systemTempIFileDir->Remove(PR_FALSE); return rv; } diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index d3063a88e1b..359c73b7fa1 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -1667,7 +1667,7 @@ NS_IMETHODIMP nsProfile::DeleteProfile(const PRUnichar* profileName, PRBool canD if (NS_SUCCEEDED(rv)) dirToDelete = parentDir; } - rv = dirToDelete->Delete(PR_TRUE); + rv = dirToDelete->Remove(PR_TRUE); } } diff --git a/mozilla/profile/src/nsProfileAccess.cpp b/mozilla/profile/src/nsProfileAccess.cpp index aa7fd79ecb1..04956a6b257 100644 --- a/mozilla/profile/src/nsProfileAccess.cpp +++ b/mozilla/profile/src/nsProfileAccess.cpp @@ -1358,7 +1358,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe { SetResolvedProfileDir(tempLocal); if (leafCreated) - tempLocal->Delete(PR_FALSE); + tempLocal->Remove(PR_FALSE); } } @@ -1383,7 +1383,7 @@ nsresult ProfileStruct::ExternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe rv = resolvedLocation->GetPersistentDescriptor(getter_Copies(descBuf)); if (NS_FAILED(rv)) return rv; if (leafCreated) - resolvedLocation->Delete(PR_FALSE); + resolvedLocation->Remove(PR_FALSE); regData = NS_ConvertUTF8toUCS2(descBuf); #else nsXPIDLString ucPath; diff --git a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp index 2bc277136b9..32883dd3713 100644 --- a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp @@ -3038,7 +3038,7 @@ nsChromeRegistry::CheckForNewChrome() } } PR_Close(file); - // listFile->Delete(PR_FALSE); + // listFile->Remove(PR_FALSE); return rv; } @@ -3223,7 +3223,7 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const PRUnichar * nsCOMPtr userChromeDir; rv = NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(userChromeDir)); if (NS_SUCCEEDED(rv) && userChromeDir) - rv = userChromeDir->Delete(PR_TRUE); + rv = userChromeDir->Remove(PR_TRUE); } } else if (!nsCRT::strcmp(NS_LITERAL_STRING("profile-do-change").get(), aTopic)) { diff --git a/mozilla/rdf/datasource/src/nsLocalStore.cpp b/mozilla/rdf/datasource/src/nsLocalStore.cpp index 8cbb45208e6..c5621d16c8f 100644 --- a/mozilla/rdf/datasource/src/nsLocalStore.cpp +++ b/mozilla/rdf/datasource/src/nsLocalStore.cpp @@ -488,7 +488,7 @@ LocalStoreImpl::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const PR nsCOMPtr aFile; rv = NS_GetSpecialDirectory(NS_APP_LOCALSTORE_50_FILE, getter_AddRefs(aFile)); if (NS_SUCCEEDED(rv)) - rv = aFile->Delete(PR_FALSE); + rv = aFile->Remove(PR_FALSE); } } else if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-do-change").get())) { diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index f5d875bb159..0a8472276ce 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -563,7 +563,7 @@ nsresult nsExternalHelperAppService::ExpungeTemporaryFiles() { localFile = do_QueryInterface(element); if (localFile) - localFile->Delete(PR_FALSE); + localFile->Remove(PR_FALSE); } } @@ -1107,7 +1107,7 @@ nsresult nsExternalAppHandler::MoveFile(nsIFile * aNewFileLocation) fileToUse->Equals(mTempFile, &equalToTempFile); fileToUse->Exists(&filetoUseAlreadyExists); if (filetoUseAlreadyExists && !equalToTempFile) - fileToUse->Delete(PR_FALSE); + fileToUse->Remove(PR_FALSE); // extract the new leaf name from the file location nsXPIDLCString fileName; @@ -1243,7 +1243,7 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel() // clean up after ourselves and delete the temp file... if (mTempFile) { - mTempFile->Delete(PR_TRUE); + mTempFile->Remove(PR_TRUE); mTempFile = nsnull; } diff --git a/mozilla/xpcom/io/nsIFile.idl b/mozilla/xpcom/io/nsIFile.idl index 06fcc2b6733..cd33061feef 100644 --- a/mozilla/xpcom/io/nsIFile.idl +++ b/mozilla/xpcom/io/nsIFile.idl @@ -172,7 +172,7 @@ interface nsIFile : nsISupports * * This will not resolve any symlinks. */ - void delete(in boolean recursive); + void remove(in boolean recursive); /** * Attributes of nsIFile. diff --git a/mozilla/xpcom/io/nsLocalFileMac.cpp b/mozilla/xpcom/io/nsLocalFileMac.cpp index 6a4c40d5409..15ec778e2e1 100644 --- a/mozilla/xpcom/io/nsLocalFileMac.cpp +++ b/mozilla/xpcom/io/nsLocalFileMac.cpp @@ -1504,7 +1504,7 @@ nsresult nsLocalFile::MoveCopy( nsIFile* newParentDir, const char* newName, PRBo rv = CopyTo( newParentDir, newName ); if ( NS_FAILED ( rv ) ) return rv; - return Delete( PR_TRUE ); + return Remove( PR_TRUE ); } } return MacErrorMapper( macErr ); @@ -1588,7 +1588,7 @@ nsLocalFile::Load(PRLibrary * *_retval) } NS_IMETHODIMP -nsLocalFile::Delete(PRBool recursive) +nsLocalFile::Remove(PRBool recursive) { MakeDirty(); diff --git a/mozilla/xpcom/io/nsLocalFileOS2.cpp b/mozilla/xpcom/io/nsLocalFileOS2.cpp index 529eeceeeeb..a76426309c1 100644 --- a/mozilla/xpcom/io/nsLocalFileOS2.cpp +++ b/mozilla/xpcom/io/nsLocalFileOS2.cpp @@ -1265,7 +1265,7 @@ nsLocalFile::Load(PRLibrary * *_retval) } NS_IMETHODIMP -nsLocalFile::Delete(PRBool recursive) +nsLocalFile::Remove(PRBool recursive) { PRBool isDir; @@ -1296,7 +1296,7 @@ nsLocalFile::Delete(PRBool recursive) iterator->GetNext(getter_AddRefs(item)); file = do_QueryInterface(item); - file->Delete(recursive); + file->Remove(recursive); iterator->HasMoreElements(&more); } diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 98e2c602504..c4faae7a7d5 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -753,7 +753,7 @@ nsLocalFile::MoveTo(nsIFile *newParent, const char *newName) #endif rv = CopyTo(newParent, newName); if (NS_SUCCEEDED(rv)) - rv = Delete(PR_TRUE); + rv = Remove(PR_TRUE); } else { rv = NSRESULT_FOR_ERRNO(); } @@ -762,7 +762,7 @@ nsLocalFile::MoveTo(nsIFile *newParent, const char *newName) } NS_IMETHODIMP -nsLocalFile::Delete(PRBool recursive) +nsLocalFile::Remove(PRBool recursive) { CHECK_mPath(); @@ -795,7 +795,7 @@ nsLocalFile::Delete(PRBool recursive) nsCOMPtr file = do_QueryInterface(item, &rv); if (NS_FAILED(rv)) return NS_ERROR_FAILURE; - if (NS_FAILED(rv = file->Delete(recursive))) + if (NS_FAILED(rv = file->Remove(recursive))) return rv; } } diff --git a/mozilla/xpcom/io/nsLocalFileWin.cpp b/mozilla/xpcom/io/nsLocalFileWin.cpp index bfefbbbda5a..85eda58610d 100644 --- a/mozilla/xpcom/io/nsLocalFileWin.cpp +++ b/mozilla/xpcom/io/nsLocalFileWin.cpp @@ -1159,7 +1159,7 @@ nsLocalFile::Load(PRLibrary * *_retval) } NS_IMETHODIMP -nsLocalFile::Delete(PRBool recursive) +nsLocalFile::Remove(PRBool recursive) { PRBool isDir; @@ -1190,7 +1190,7 @@ nsLocalFile::Delete(PRBool recursive) iterator->GetNext(getter_AddRefs(item)); file = do_QueryInterface(item); - file->Delete(recursive); + file->Remove(recursive); iterator->HasMoreElements(&more); } diff --git a/mozilla/xpcom/reflect/xptinfo/src/xptiManifest.cpp b/mozilla/xpcom/reflect/xptinfo/src/xptiManifest.cpp index 4537c820417..ab97c62c95b 100644 --- a/mozilla/xpcom/reflect/xptinfo/src/xptiManifest.cpp +++ b/mozilla/xpcom/reflect/xptinfo/src/xptiManifest.cpp @@ -186,7 +186,7 @@ out: if(NS_FAILED(mainFile->Exists(&exists))) return PR_FALSE; - if(exists && NS_FAILED(mainFile->Delete(PR_FALSE))) + if(exists && NS_FAILED(mainFile->Remove(PR_FALSE))) return PR_FALSE; // XXX Would prefer MoveTo with a 'null' newdir, the but nsILocalFile diff --git a/mozilla/xpcom/tests/nsIFileTest.cpp b/mozilla/xpcom/tests/nsIFileTest.cpp index 292a16d94c0..4bbc3b600b3 100644 --- a/mozilla/xpcom/tests/nsIFileTest.cpp +++ b/mozilla/xpcom/tests/nsIFileTest.cpp @@ -301,7 +301,7 @@ DeletionTest(char* creationPath, char* appendPath, PRBool recursive) else printf("no.\n"); - rv = file->Delete(recursive); + rv = file->Remove(recursive); VerifyResult(rv); rv = file->Exists(&exists); diff --git a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp index 09414e4d2c4..739481139eb 100644 --- a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp @@ -2151,7 +2151,7 @@ nsGlobalHistory::OpenDB() // we couldn't open the file, so it's either corrupt or doesn't exist. // attempt to delete the file, but ignore the error - historyFile->Delete(PR_FALSE); + historyFile->Remove(PR_FALSE); rv = OpenNewFile(factory, filePath); } @@ -3163,7 +3163,7 @@ nsGlobalHistory::Observe(nsISupports *aSubject, const PRUnichar *aTopic, nsCOMPtr historyFile; rv = NS_GetSpecialDirectory(NS_APP_HISTORY_50_FILE, getter_AddRefs(historyFile)); if (NS_SUCCEEDED(rv)) - rv = historyFile->Delete(PR_FALSE); + rv = historyFile->Remove(PR_FALSE); } } else if (aTopicString.Equals(NS_LITERAL_STRING("profile-do-change"))) diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp index c28b642e178..450c60ef842 100755 --- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp @@ -2318,7 +2318,7 @@ InternetSearchDataSource::saveContents(nsIChannel* channel, nsIInternetSearchCon // save data to file // Note: write out one character at a time, as we might be dealing // with binary data (such as 0x00) [especially for images] - outFile->Delete(PR_FALSE); + outFile->Remove(PR_FALSE); // Make an nsFileSpec from file so we can use nsOutputFileStream nsXPIDLCString pathBuf; @@ -5745,7 +5745,7 @@ InternetSearchDataSource::Observe(nsISupports *aSubject, const PRUnichar *aTopic nsCOMPtr searchFile; rv = NS_GetSpecialDirectory(NS_APP_SEARCH_50_FILE, getter_AddRefs(searchFile)); if (NS_SUCCEEDED(rv)) - rv = searchFile->Delete(PR_FALSE); + rv = searchFile->Remove(PR_FALSE); } } else if (!nsCRT::strcmp(aTopic, NS_LITERAL_STRING("profile-do-change").get())) diff --git a/mozilla/xpinstall/src/ScheduledTasks.cpp b/mozilla/xpinstall/src/ScheduledTasks.cpp index 4b9fd559705..f4df4f747f4 100644 --- a/mozilla/xpinstall/src/ScheduledTasks.cpp +++ b/mozilla/xpinstall/src/ScheduledTasks.cpp @@ -171,7 +171,7 @@ PRInt32 DeleteFileNowOrSchedule(nsIFile* filename) PRBool flagExists; PRInt32 result = nsInstall::SUCCESS; - filename->Delete(PR_FALSE); + filename->Remove(PR_FALSE); filename->Exists(&flagExists); if (flagExists) result = ScheduleFileForDeletion(filename); @@ -472,7 +472,7 @@ void DeleteScheduledFiles( HREG reg ) if (NS_SUCCEEDED(rv)) { PRBool flagExists; - doomedFile->Delete(PR_FALSE); + doomedFile->Remove(PR_FALSE); doomedFile->Exists(&flagExists); if ( !flagExists ) { diff --git a/mozilla/xpinstall/src/nsInstallFile.cpp b/mozilla/xpinstall/src/nsInstallFile.cpp index 4d5cd30c3a3..10ba7055289 100644 --- a/mozilla/xpinstall/src/nsInstallFile.cpp +++ b/mozilla/xpinstall/src/nsInstallFile.cpp @@ -237,7 +237,7 @@ void nsInstallFile::RemoveAllFolders() mFinalFile->GetParent(nsfsFolder); for(i = 0; i < mFolderCreateCount; i++) { - nsfsFolder.Delete(PR_FALSE); + nsfsFolder.Remove(PR_FALSE); nsfsFolder.GetParent(nsfsParentFolder); nsfsFolder = nsfsParentFolder; } @@ -308,7 +308,7 @@ PRInt32 nsInstallFile::Complete() void nsInstallFile::Abort() { if (mExtractedFile != nsnull) - mExtractedFile->Delete(PR_FALSE); + mExtractedFile->Remove(PR_FALSE); } #define RESBUFSIZE 4096 diff --git a/mozilla/xpinstall/src/nsInstallFileOpItem.cpp b/mozilla/xpinstall/src/nsInstallFileOpItem.cpp index 5f66255a207..236a99c81f2 100644 --- a/mozilla/xpinstall/src/nsInstallFileOpItem.cpp +++ b/mozilla/xpinstall/src/nsInstallFileOpItem.cpp @@ -588,7 +588,7 @@ PRInt32 nsInstallFileOpItem::NativeFileOpDirCreateAbort() { if(nsInstallFileOpItem::ACTION_SUCCESS == mAction) - mTarget->Delete(PR_FALSE); + mTarget->Remove(PR_FALSE); return nsInstall::SUCCESS; } @@ -615,7 +615,7 @@ nsInstallFileOpItem::NativeFileOpDirRemovePrepare() PRInt32 nsInstallFileOpItem::NativeFileOpDirRemoveComplete() { - mTarget->Delete(mFlags); + mTarget->Remove(mFlags); return nsInstall::SUCCESS; } @@ -826,7 +826,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyComplete() mTarget->IsFile(&flagIsFile); //Target is file that is already on the system if (flagIsFile) { - rv = mTarget->Delete(PR_FALSE); + rv = mTarget->Remove(PR_FALSE); if (NS_FAILED(rv)) return rv; rv = mTarget->GetParent(getter_AddRefs(parent)); if (NS_FAILED(rv)) return rv; @@ -844,7 +844,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyComplete() if (NS_FAILED(rv)) return rv; tempTarget->Exists(&flagExists); if (flagExists) - tempTarget->Delete(PR_FALSE); + tempTarget->Remove(PR_FALSE); rv = mSrc->CopyTo(mTarget, leafName); } @@ -876,7 +876,7 @@ nsInstallFileOpItem::NativeFileOpFileCopyAbort() char* leafName; mSrc->GetLeafName(&leafName); fullTarget->Append(leafName); - fullTarget->Delete(PR_FALSE); + fullTarget->Remove(PR_FALSE); } return ret; @@ -1236,7 +1236,7 @@ nsInstallFileOpItem::NativeFileOpWindowsShortcutPrepare() if(!flagExists) ret = nsInstall::ACCESS_DENIED; else - tempVar->Delete(0); + tempVar->Remove(0); } } diff --git a/mozilla/xpinstall/src/nsInstallPatch.cpp b/mozilla/xpinstall/src/nsInstallPatch.cpp index b9e8a3ef8bc..1871803f7f5 100644 --- a/mozilla/xpinstall/src/nsInstallPatch.cpp +++ b/mozilla/xpinstall/src/nsInstallPatch.cpp @@ -245,7 +245,7 @@ PRInt32 nsInstallPatch::Prepare() mPatchFile->Exists(&flagExists); if ( (mPatchFile != nsnull) && (flagExists) ) { - mPatchFile->Delete(PR_FALSE); + mPatchFile->Remove(PR_FALSE); } @@ -255,7 +255,7 @@ PRInt32 nsInstallPatch::Prepare() mPatchFile->Exists(&flagExists); if ((mPatchedFile != nsnull) && (flagExists)) { - mPatchedFile->Delete(PR_FALSE); + mPatchedFile->Remove(PR_FALSE); } return err; } @@ -610,7 +610,7 @@ nsInstallPatch::NativePatch(nsIFile *sourceFile, nsIFile *patchFile, nsIFile **n outFileSpec->GetParent(getter_AddRefs(parent)); - outFileSpec->Delete(PR_FALSE); + outFileSpec->Remove(PR_FALSE); char* leaf; anotherName->GetLeafName(&leaf); @@ -660,7 +660,7 @@ cleanup: { tempSrcFile->Exists(&flagExists); if (flagExists) - tempSrcFile->Delete(PR_FALSE); + tempSrcFile->Remove(PR_FALSE); } /* lets map any GDIFF error to nice SU errors */ diff --git a/mozilla/xpinstall/src/nsXPInstallManager.cpp b/mozilla/xpinstall/src/nsXPInstallManager.cpp index ee181d5dfe0..064dcc58b2d 100644 --- a/mozilla/xpinstall/src/nsXPInstallManager.cpp +++ b/mozilla/xpinstall/src/nsXPInstallManager.cpp @@ -543,7 +543,7 @@ void nsXPInstallManager::Shutdown() { item = NS_STATIC_CAST(nsXPITriggerItem*, mTriggers->Get(i)); if ( item && item->mFile && !item->IsFileURL() ) - item->mFile->Delete(PR_FALSE); + item->mFile->Remove(PR_FALSE); } } @@ -754,7 +754,7 @@ nsXPInstallManager::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult rv2 ; rv2 = mItem->mFile->Exists(&flagExists); if (NS_SUCCEEDED(rv2) && flagExists) - mItem->mFile->Delete(PR_FALSE); + mItem->mFile->Remove(PR_FALSE); mItem->mFile = 0; }