2014-05-05 17:30:43 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2000-04-20 05:44:03 +00:00
|
|
|
#include "nsIServiceManager.h"
|
2000-04-21 21:44:23 +00:00
|
|
|
|
2000-12-09 04:11:05 +00:00
|
|
|
#include "nsLocalFile.h" // includes platform-specific headers
|
2000-04-20 05:44:03 +00:00
|
|
|
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2002-04-09 14:12:24 +00:00
|
|
|
#include "nsReadableUtils.h"
|
2002-04-27 05:33:09 +00:00
|
|
|
#include "nsPrintfCString.h"
|
2002-05-15 18:55:21 +00:00
|
|
|
#include "nsCRT.h"
|
2008-01-09 21:10:06 +00:00
|
|
|
#include "nsNativeCharsetUtils.h"
|
|
|
|
#include "nsUTF8Utils.h"
|
2001-06-21 22:02:47 +00:00
|
|
|
|
2004-05-29 15:37:44 +00:00
|
|
|
#ifdef XP_WIN
|
|
|
|
#include <string.h>
|
|
|
|
#endif
|
|
|
|
|
2012-08-18 02:43:00 +00:00
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
void
|
|
|
|
NS_StartupLocalFile()
|
2000-12-09 04:11:05 +00:00
|
|
|
{
|
2014-05-05 17:30:43 +00:00
|
|
|
nsLocalFile::GlobalInit();
|
2000-12-09 04:11:05 +00:00
|
|
|
}
|
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
void
|
|
|
|
NS_ShutdownLocalFile()
|
2000-12-09 04:11:05 +00:00
|
|
|
{
|
2014-05-05 17:30:43 +00:00
|
|
|
nsLocalFile::GlobalShutdown();
|
2000-12-09 04:11:05 +00:00
|
|
|
}
|
|
|
|
|
2010-04-27 12:57:34 +00:00
|
|
|
#if !defined(MOZ_WIDGET_COCOA) && !defined(XP_WIN)
|
2002-04-09 14:12:24 +00:00
|
|
|
NS_IMETHODIMP
|
2014-05-14 20:15:46 +00:00
|
|
|
nsLocalFile::InitWithFile(nsIFile* aFile)
|
2002-04-09 14:12:24 +00:00
|
|
|
{
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_WARN_IF(!aFile)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_INVALID_ARG;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
nsAutoCString path;
|
|
|
|
aFile->GetNativePath(path);
|
2014-05-14 20:15:46 +00:00
|
|
|
if (path.IsEmpty()) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_INVALID_ARG;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
return InitWithNativePath(path);
|
2002-04-09 14:12:24 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2002-09-25 12:23:39 +00:00
|
|
|
#define kMaxFilenameLength 255
|
2005-02-19 07:44:59 +00:00
|
|
|
#define kMaxExtensionLength 100
|
2008-01-09 21:10:06 +00:00
|
|
|
#define kMaxSequenceNumberLength 5 // "-9999"
|
|
|
|
// requirement: kMaxExtensionLength < kMaxFilenameLength - kMaxSequenceNumberLength
|
2000-07-12 23:31:31 +00:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-05-14 20:15:46 +00:00
|
|
|
nsLocalFile::CreateUnique(uint32_t aType, uint32_t aAttributes)
|
2000-07-12 23:31:31 +00:00
|
|
|
{
|
2014-05-05 17:30:43 +00:00
|
|
|
nsresult rv;
|
|
|
|
bool longName;
|
2008-01-09 21:10:06 +00:00
|
|
|
|
|
|
|
#ifdef XP_WIN
|
2014-05-05 17:30:43 +00:00
|
|
|
nsAutoString pathName, leafName, rootName, suffix;
|
|
|
|
rv = GetPath(pathName);
|
2008-01-09 21:10:06 +00:00
|
|
|
#else
|
2014-05-05 17:30:43 +00:00
|
|
|
nsAutoCString pathName, leafName, rootName, suffix;
|
|
|
|
rv = GetNativePath(pathName);
|
2008-01-09 21:10:06 +00:00
|
|
|
#endif
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
longName = (pathName.Length() + kMaxSequenceNumberLength >
|
|
|
|
kMaxFilenameLength);
|
2014-05-14 20:15:46 +00:00
|
|
|
if (!longName) {
|
|
|
|
rv = Create(aType, aAttributes);
|
|
|
|
if (rv != NS_ERROR_FILE_ALREADY_EXISTS) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
2008-01-09 21:10:06 +00:00
|
|
|
|
|
|
|
#ifdef XP_WIN
|
2014-05-05 17:30:43 +00:00
|
|
|
rv = GetLeafName(leafName);
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2000-07-12 23:31:31 +00:00
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
const int32_t lastDot = leafName.RFindChar(char16_t('.'));
|
2008-01-09 21:10:06 +00:00
|
|
|
#else
|
2014-05-05 17:30:43 +00:00
|
|
|
rv = GetNativeLeafName(leafName);
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2000-07-12 23:31:31 +00:00
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
const int32_t lastDot = leafName.RFindChar('.');
|
2008-01-09 21:10:06 +00:00
|
|
|
#endif
|
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
if (lastDot == kNotFound) {
|
2014-05-05 17:30:43 +00:00
|
|
|
rootName = leafName;
|
2014-05-14 20:15:46 +00:00
|
|
|
} else {
|
2014-05-05 17:30:43 +00:00
|
|
|
suffix = Substring(leafName, lastDot); // include '.'
|
|
|
|
rootName = Substring(leafName, 0, lastDot); // strip suffix and dot
|
|
|
|
}
|
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
if (longName) {
|
2014-05-05 17:30:43 +00:00
|
|
|
int32_t maxRootLength = (kMaxFilenameLength -
|
|
|
|
(pathName.Length() - leafName.Length()) -
|
|
|
|
suffix.Length() - kMaxSequenceNumberLength);
|
|
|
|
|
|
|
|
// We cannot create an item inside a directory whose name is too long.
|
|
|
|
// Also, ensure that at least one character remains after we truncate
|
|
|
|
// the root name, as we don't want to end up with an empty leaf name.
|
2014-05-14 20:15:46 +00:00
|
|
|
if (maxRootLength < 2) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2010-05-02 08:28:26 +00:00
|
|
|
|
2008-01-09 21:10:06 +00:00
|
|
|
#ifdef XP_WIN
|
2014-05-05 17:30:43 +00:00
|
|
|
// ensure that we don't cut the name in mid-UTF16-character
|
|
|
|
rootName.SetLength(NS_IS_LOW_SURROGATE(rootName[maxRootLength]) ?
|
|
|
|
maxRootLength - 1 : maxRootLength);
|
|
|
|
SetLeafName(rootName + suffix);
|
2008-01-09 21:10:06 +00:00
|
|
|
#else
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_IsNativeUTF8()) {
|
2014-05-05 17:30:43 +00:00
|
|
|
// ensure that we don't cut the name in mid-UTF8-character
|
|
|
|
// (assume the name is valid UTF8 to begin with)
|
2014-05-14 20:15:46 +00:00
|
|
|
while (UTF8traits::isInSeq(rootName[maxRootLength])) {
|
2014-05-05 17:30:43 +00:00
|
|
|
--maxRootLength;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
// Another check to avoid ending up with an empty leaf name.
|
2014-05-14 20:15:46 +00:00
|
|
|
if (maxRootLength == 0 && suffix.IsEmpty()) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2008-01-09 21:10:06 +00:00
|
|
|
}
|
2000-07-12 23:31:31 +00:00
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
rootName.SetLength(maxRootLength);
|
|
|
|
SetNativeLeafName(rootName + suffix);
|
|
|
|
#endif
|
2015-09-08 06:56:16 +00:00
|
|
|
nsresult rvCreate = Create(aType, aAttributes);
|
|
|
|
if (rvCreate != NS_ERROR_FILE_ALREADY_EXISTS) {
|
|
|
|
return rvCreate;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
for (int indx = 1; indx < 10000; ++indx) {
|
2014-05-05 17:30:43 +00:00
|
|
|
// start with "Picture-1.jpg" after "Picture.jpg" exists
|
2008-01-09 21:10:06 +00:00
|
|
|
#ifdef XP_WIN
|
2014-05-05 17:30:43 +00:00
|
|
|
SetLeafName(rootName +
|
|
|
|
NS_ConvertASCIItoUTF16(nsPrintfCString("-%d", indx)) +
|
|
|
|
suffix);
|
2008-01-09 21:10:06 +00:00
|
|
|
#else
|
2014-05-05 17:30:43 +00:00
|
|
|
SetNativeLeafName(rootName + nsPrintfCString("-%d", indx) + suffix);
|
2008-01-09 21:10:06 +00:00
|
|
|
#endif
|
2014-05-14 20:15:46 +00:00
|
|
|
rv = Create(aType, aAttributes);
|
|
|
|
if (NS_SUCCEEDED(rv) || rv != NS_ERROR_FILE_ALREADY_EXISTS) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// The disk is full, sort of
|
|
|
|
return NS_ERROR_FILE_TOO_BIG;
|
2000-07-12 23:31:31 +00:00
|
|
|
}
|
|
|
|
|
2014-02-10 22:57:01 +00:00
|
|
|
#if defined(XP_WIN)
|
2014-01-04 15:02:17 +00:00
|
|
|
static const char16_t kPathSeparatorChar = '\\';
|
Bug 627277 - Remove (broken) BeOS support. r=biesi,dwitte,gavin,joe,jorendorff,josh,khuey,mfinkle,neil,Pike,roc,shaver,smontagu,taras
2011-02-19 19:10:24 +00:00
|
|
|
#elif defined(XP_UNIX)
|
2014-01-04 15:02:17 +00:00
|
|
|
static const char16_t kPathSeparatorChar = '/';
|
2002-04-09 14:12:24 +00:00
|
|
|
#else
|
|
|
|
#error Need to define file path separator for your platform
|
|
|
|
#endif
|
|
|
|
|
2015-06-17 20:17:22 +00:00
|
|
|
static void
|
|
|
|
SplitPath(char16_t* aPath, nsTArray<char16_t*>& aNodeArray)
|
2002-04-09 14:12:24 +00:00
|
|
|
{
|
2014-05-14 20:15:46 +00:00
|
|
|
if (*aPath == 0) {
|
2015-06-17 20:17:22 +00:00
|
|
|
return;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
if (*aPath == kPathSeparatorChar) {
|
|
|
|
aPath++;
|
|
|
|
}
|
2015-06-17 20:17:22 +00:00
|
|
|
aNodeArray.AppendElement(aPath);
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2014-05-14 20:15:46 +00:00
|
|
|
for (char16_t* cp = aPath; *cp != 0; ++cp) {
|
2014-05-05 17:30:43 +00:00
|
|
|
if (*cp == kPathSeparatorChar) {
|
|
|
|
*cp++ = 0;
|
2014-05-14 20:15:46 +00:00
|
|
|
if (*cp == 0) {
|
2014-05-05 17:30:43 +00:00
|
|
|
break;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2015-06-17 20:17:22 +00:00
|
|
|
aNodeArray.AppendElement(cp);
|
2002-04-09 14:12:24 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
2002-04-09 14:12:24 +00:00
|
|
|
}
|
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2002-04-09 14:12:24 +00:00
|
|
|
NS_IMETHODIMP
|
2014-05-14 20:15:46 +00:00
|
|
|
nsLocalFile::GetRelativeDescriptor(nsIFile* aFromFile, nsACString& aResult)
|
2002-04-09 14:12:24 +00:00
|
|
|
{
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_WARN_IF(!aFromFile)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_INVALID_ARG;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
//
|
2014-05-14 20:15:46 +00:00
|
|
|
// aResult will be UTF-8 encoded
|
2014-05-05 17:30:43 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
nsresult rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
aResult.Truncate(0);
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
nsAutoString thisPath, fromPath;
|
2016-02-02 15:36:30 +00:00
|
|
|
AutoTArray<char16_t*, 32> thisNodes;
|
|
|
|
AutoTArray<char16_t*, 32> fromNodes;
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
rv = GetPath(thisPath);
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
|
|
|
rv = aFromFile->GetPath(fromPath);
|
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
// get raw pointer to mutable string buffer
|
2014-05-14 20:15:46 +00:00
|
|
|
char16_t* thisPathPtr;
|
|
|
|
thisPath.BeginWriting(thisPathPtr);
|
|
|
|
char16_t* fromPathPtr;
|
|
|
|
fromPath.BeginWriting(fromPathPtr);
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2015-06-17 20:17:22 +00:00
|
|
|
SplitPath(thisPathPtr, thisNodes);
|
|
|
|
SplitPath(fromPathPtr, fromNodes);
|
2014-05-05 17:30:43 +00:00
|
|
|
|
2015-06-17 20:17:22 +00:00
|
|
|
size_t nodeIndex;
|
|
|
|
for (nodeIndex = 0;
|
|
|
|
nodeIndex < thisNodes.Length() && nodeIndex < fromNodes.Length();
|
|
|
|
++nodeIndex) {
|
2004-05-29 15:37:44 +00:00
|
|
|
#ifdef XP_WIN
|
2014-08-25 19:17:15 +00:00
|
|
|
if (_wcsicmp(char16ptr_t(thisNodes[nodeIndex]),
|
|
|
|
char16ptr_t(fromNodes[nodeIndex]))) {
|
2014-05-05 17:30:43 +00:00
|
|
|
break;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2004-05-29 15:37:44 +00:00
|
|
|
#else
|
2014-05-14 20:15:46 +00:00
|
|
|
if (nsCRT::strcmp(thisNodes[nodeIndex], fromNodes[nodeIndex])) {
|
2014-05-05 17:30:43 +00:00
|
|
|
break;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2004-05-29 15:37:44 +00:00
|
|
|
#endif
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
2015-06-17 20:17:22 +00:00
|
|
|
size_t branchIndex = nodeIndex;
|
|
|
|
for (nodeIndex = branchIndex; nodeIndex < fromNodes.Length(); ++nodeIndex) {
|
2014-05-14 20:15:46 +00:00
|
|
|
aResult.AppendLiteral("../");
|
|
|
|
}
|
2015-06-17 20:17:22 +00:00
|
|
|
for (nodeIndex = branchIndex; nodeIndex < thisNodes.Length(); ++nodeIndex) {
|
2014-05-05 17:30:43 +00:00
|
|
|
NS_ConvertUTF16toUTF8 nodeStr(thisNodes[nodeIndex]);
|
2014-05-14 20:15:46 +00:00
|
|
|
aResult.Append(nodeStr);
|
2015-06-17 20:17:22 +00:00
|
|
|
if (nodeIndex + 1 < thisNodes.Length()) {
|
2014-05-14 20:15:46 +00:00
|
|
|
aResult.Append('/');
|
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
2002-04-09 14:12:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-05-14 20:15:46 +00:00
|
|
|
nsLocalFile::SetRelativeDescriptor(nsIFile* aFromFile,
|
|
|
|
const nsACString& aRelativeDesc)
|
2002-04-09 14:12:24 +00:00
|
|
|
{
|
2014-05-05 17:30:43 +00:00
|
|
|
NS_NAMED_LITERAL_CSTRING(kParentDirStr, "../");
|
2001-11-16 02:09:13 +00:00
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
nsCOMPtr<nsIFile> targetFile;
|
2014-05-14 20:15:46 +00:00
|
|
|
nsresult rv = aFromFile->Clone(getter_AddRefs(targetFile));
|
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2001-11-16 02:09:13 +00:00
|
|
|
|
2014-05-05 17:30:43 +00:00
|
|
|
//
|
2014-05-14 20:15:46 +00:00
|
|
|
// aRelativeDesc is UTF-8 encoded
|
2014-05-05 17:30:43 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
nsCString::const_iterator strBegin, strEnd;
|
2014-05-14 20:15:46 +00:00
|
|
|
aRelativeDesc.BeginReading(strBegin);
|
|
|
|
aRelativeDesc.EndReading(strEnd);
|
2014-05-05 17:30:43 +00:00
|
|
|
|
|
|
|
nsCString::const_iterator nodeBegin(strBegin), nodeEnd(strEnd);
|
|
|
|
nsCString::const_iterator pos(strBegin);
|
|
|
|
|
|
|
|
nsCOMPtr<nsIFile> parentDir;
|
|
|
|
while (FindInReadable(kParentDirStr, nodeBegin, nodeEnd)) {
|
|
|
|
rv = targetFile->GetParent(getter_AddRefs(parentDir));
|
2014-05-14 20:15:46 +00:00
|
|
|
if (NS_FAILED(rv)) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return rv;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
|
|
|
if (!parentDir) {
|
2014-05-05 17:30:43 +00:00
|
|
|
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
targetFile = parentDir;
|
|
|
|
|
|
|
|
nodeBegin = nodeEnd;
|
|
|
|
pos = nodeEnd;
|
|
|
|
nodeEnd = strEnd;
|
|
|
|
}
|
|
|
|
|
|
|
|
nodeBegin = nodeEnd = pos;
|
|
|
|
while (nodeEnd != strEnd) {
|
|
|
|
FindCharInReadable('/', nodeEnd, strEnd);
|
|
|
|
targetFile->Append(NS_ConvertUTF8toUTF16(Substring(nodeBegin, nodeEnd)));
|
2014-05-14 20:15:46 +00:00
|
|
|
if (nodeEnd != strEnd) { // If there's more left in the string, inc over the '/' nodeEnd is on.
|
2014-05-05 17:30:43 +00:00
|
|
|
++nodeEnd;
|
2014-05-14 20:15:46 +00:00
|
|
|
}
|
2014-05-05 17:30:43 +00:00
|
|
|
nodeBegin = nodeEnd;
|
|
|
|
}
|
|
|
|
|
|
|
|
return InitWithFile(targetFile);
|
2002-04-09 14:12:24 +00:00
|
|
|
}
|
2015-06-17 20:17:20 +00:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsLocalFile::GetRelativePath(nsIFile* aFromFile, nsACString& aResult)
|
|
|
|
{
|
|
|
|
return GetRelativeDescriptor(aFromFile, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsLocalFile::SetRelativePath(nsIFile* aFromFile,
|
|
|
|
const nsACString& aRelativePath)
|
|
|
|
{
|
|
|
|
return SetRelativeDescriptor(aFromFile, aRelativePath);
|
|
|
|
}
|