videoplayerapp/videoplayerengine/tsrc/testvideoappuiengine/stub/src/coneutils_stub.cpp
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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: cone utilities stub for unit testing |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 #include <f32file.h> |
|
21 #include <coeutils.h> |
|
22 |
|
23 TBool ConeUtils::FileExists(const TDesC& aFileName) |
|
24 { |
|
25 TBool retVal = EFalse; |
|
26 |
|
27 RFs fs; |
|
28 RFile file; |
|
29 |
|
30 TInt error = fs.Connect(); |
|
31 |
|
32 if ( error == KErrNone ) |
|
33 { |
|
34 fs.ShareProtected(); |
|
35 |
|
36 error = file.Open( fs, aFileName, EFileRead ); |
|
37 |
|
38 if ( error == KErrNone ) |
|
39 { |
|
40 retVal = ETrue; |
|
41 |
|
42 file.Close(); |
|
43 } |
|
44 |
|
45 fs.Close(); |
|
46 } |
|
47 |
|
48 return retVal; |
|
49 } |