зеркало из https://github.com/mozilla/pjs.git
add Delete() to the nsIFileSpec interface.
This commit is contained in:
Родитель
16cd930eb3
Коммит
9084c85e5c
|
@ -166,6 +166,10 @@ class nsFileSpecWithUIImpl
|
|||
NS_IMETHOD Touch ()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Touch() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void delete (in boolean aRecursive); */
|
||||
NS_IMETHOD Delete(PRBool aRecursive)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Delete(aRecursive) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void truncate (in long aNewLength); */
|
||||
NS_IMETHOD Truncate(PRInt32 aNewLength)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Truncate(aNewLength) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
|
|
@ -392,6 +392,13 @@ NS_IMETHODIMP nsFileSpecImpl::CreateDir()
|
|||
return mFileSpec.Error();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::Delete(PRBool aRecursive)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec.Delete(aRecursive);
|
||||
return mFileSpec.Error();
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::Truncate(PRInt32 aNewLength)
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
|
|
@ -102,6 +102,7 @@ interface nsIFileSpec : nsISupports
|
|||
boolean isSymlink();
|
||||
void resolveSymlink();
|
||||
|
||||
void delete(in boolean recursive);
|
||||
void truncate(in long aNewLength);
|
||||
void rename([const] in string newLeafName);
|
||||
void copyToDir([const] in nsIFileSpec newParentDir);
|
||||
|
|
Загрузка…
Ссылка в новой задаче