First public contribution.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Support routines for managing paths and directories
15 // provided by the LPOSIX.LIB component of STDLIB
22 #include <f32file.h> // for TParse
23 #include <sys/dirent.h>
30 various combinations that one can get as parameters for link , rename system call
33 #ifdef SYMBIAN_OE_LIBRT
34 #define SHM_CHUNKSIZE 4096
35 #endif //SYMBIAN_OE_LIBRT
38 enum Path_Combinations
40 DirEmpty_DirEmpty= 0 ,
41 DirEmpty_DirNotEmpty ,
43 DirNotEmpty_DirEmpty ,
44 DirNotEmpty_DirNotEmpty ,
50 Invalid_Path_EnotDir ,
56 GLREF_C TInt GetFullPath(TParse& aParse, const TText16* upath, TDes* aFileName);
57 GLREF_C TInt GetFullFile(TFileName& aName, const TText16* upath, RFs& aSession);
58 GLDEF_C TInt Find_Error(const wchar_t *name, RSessionBase& aSession) ;
59 GLDEF_C TInt Find_Error(TFileName& aName, RSessionBase& aSession) ;
60 IMPORT_C int MapError(TInt err, int& anErrno);
61 int StrCmp(const char *aDst, const char *aSrc);
62 wchar_t* WcsCpy(wchar_t* __restrict aDst, const wchar_t * __restrict aSrc);
63 int WcsCmp(const wchar_t* aDst, const wchar_t* aSrc);
64 size_t WcsLen(wchar_t* aSrc);
65 size_t StrlCopy(char *aDst, const char *aSrc, size_t aSize);
66 char* StrCopy(char* aDst, const char* aSrc);
67 GLDEF_C TInt Get_PathCombinations(TFileName& aOldName, TFileName& aNewName ,RFs & aSession) ;
68 #ifdef SYMBIAN_OE_LIBRT
69 TInt GeneratePathKey(const TDesC& aName);
70 #endif //SYMBIAN_OE_LIBRT
71 TInt ConvertUnicodeToUtf8(const TDesC16 &aUnicode,HBufC8*& aUtf8Buf,TInt &aErrNum);
72 GLDEF_C TInt GetFullFileUtf8(TDes8 &aName, const char* apath, RFs& aSession);