Changed API for nsIFileLocator

git-svn-id: svn://10.0.0.236/trunk@35366 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mcmullen%netscape.com
1999-06-15 05:18:00 +00:00
parent da5a1f912c
commit 7e5a37fddc
4 changed files with 25 additions and 58 deletions

View File

@@ -34,6 +34,7 @@
#include "nsIStringBundle.h"
#include "nsFileStream.h"
#include "nsIFileLocator.h"
#include "nsIFileSpec.h"
#include "nsFileLocations.h"
extern "C" {
@@ -187,20 +188,11 @@ cookie_Localize(char* genericString) {
}
PRIVATE nsresult cookie_ProfileDirectory(nsFileSpec& dirSpec) {
nsresult rv;
nsIFileLocator* locator = nsnull;
rv = nsServiceManager::GetService
(kFileLocatorCID, kIFileLocatorIID, (nsISupports**)&locator);
if (NS_FAILED(rv)) {
return rv;
}
if (!locator) {
return NS_ERROR_FAILURE;
}
rv = locator->GetFileLocation
(nsSpecialFileSpec::App_UserProfileDirectory50, &dirSpec);
nsServiceManager::ReleaseService(kFileLocatorCID, locator);
return rv;
nsIFileSpec* spec = NS_LocateFileOrDirectory(
nsSpecialFileSpec::App_UserProfileDirectory50);
if (!spec)
return NS_ERROR_FAILURE;
return spec->GetFileSpec(&dirSpec);
}
#ifndef XP_MAC