1 /* |
1 /* |
2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
98 if (err != KErrNone && err != KErrAlreadyExists) |
98 if (err != KErrNone && err != KErrAlreadyExists) |
99 { |
99 { |
100 User::LeaveIfError(err); |
100 User::LeaveIfError(err); |
101 } |
101 } |
102 } |
102 } |
103 |
|
104 void SisRegistryUtil::CreateFileWithAttributesL(RFs& aFs, const TDesC& aPath, const TUint aAttributesMask/*= 0*/) |
|
105 { |
|
106 // Creates the folder structure by ignoring the filename at the end. |
|
107 EnsureDirExistsL(aFs, aPath); |
|
108 |
|
109 RFile file; |
|
110 CleanupClosePushL(file); |
|
111 User::LeaveIfError(file.Create(aFs, aPath, EFileWrite)); |
|
112 |
|
113 if(aAttributesMask != 0) |
|
114 { |
|
115 file.SetAtt(aAttributesMask, 0); // Ignoring return value. |
|
116 } |
|
117 CleanupStack::PopAndDestroy(&file); |
|
118 } |
|
119 |
|
120 TInt SisRegistryUtil::DeleteFile(RFs& aFs, const TDesC& aPath) |
|
121 { |
|
122 TInt err = aFs.Delete(aPath); |
|
123 |
|
124 if(KErrNone != err) |
|
125 { |
|
126 DEBUG_PRINTF2(_L("Failed to delete file %S."), &aPath); |
|
127 } |
|
128 else |
|
129 { |
|
130 DEBUG_PRINTF2(_L("Deleted file %S successfully."), &aPath); |
|
131 } |
|
132 |
|
133 return err; |
|
134 } |
|
135 |
103 |
136 // Processes the ROM stub files. Retuns ETrue if the aUid or aName |
104 // Processes the ROM stub files. Retuns ETrue if the aUid or aName |
137 // is found in any of the ROM stub files, else returns EFalse. |
105 // is found in any of the ROM stub files, else returns EFalse. |
138 TBool SisRegistryUtil::RomBasedPackageL(const TUid& aUid) |
106 TBool SisRegistryUtil::RomBasedPackageL(const TUid& aUid) |
139 { |
107 { |