|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Static utility class for file operations. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "locfileutils.h" |
|
21 #include <bautils.h> |
|
22 #include <f32file.h> |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ======================= |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // LocFileUtils::GetFileWithCorrectDriveL |
|
28 // (other items were commented in a header). |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C void LocFileUtils::GetFileWithCorrectDriveL( |
|
32 const TFileName& aDrive, |
|
33 TFileName& aFileName ) |
|
34 { |
|
35 TParse parse; |
|
36 User::LeaveIfError( parse.Set( aDrive, NULL, NULL ) ); |
|
37 User::LeaveIfError( parse.Set( parse.Drive(), &aFileName, NULL ) ); |
|
38 aFileName = parse.FullName(); |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // LocFileUtils::GetNearestLanguageFileL |
|
43 // (other items were commented in a header). |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 EXPORT_C void LocFileUtils::GetNearestLanguageFileL( |
|
47 RFs& aSession, |
|
48 const TFileName& aDrive, |
|
49 TFileName& aFileName ) |
|
50 { |
|
51 GetFileWithCorrectDriveL( aDrive, aFileName ); |
|
52 BaflUtils::NearestLanguageFile( aSession, aFileName ); |
|
53 } |
|
54 |
|
55 // End of File |