sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Support routines for managing paths and directories sl@0: // provided by the LPOSIX.LIB component of STDLIB sl@0: // sl@0: // sl@0: sl@0: #ifndef LPOSIX_H sl@0: #define LPOSIX_H sl@0: sl@0: #include // for TParse sl@0: #include sl@0: sl@0: /* sl@0: @internalComponent sl@0: */ sl@0: sl@0: /* sl@0: various combinations that one can get as parameters for link , rename system call sl@0: */ sl@0: sl@0: #ifdef SYMBIAN_OE_LIBRT sl@0: #define SHM_CHUNKSIZE 4096 sl@0: #endif //SYMBIAN_OE_LIBRT sl@0: sl@0: sl@0: enum Path_Combinations sl@0: { sl@0: DirEmpty_DirEmpty= 0 , sl@0: DirEmpty_DirNotEmpty , sl@0: DirEmpty_File , sl@0: DirNotEmpty_DirEmpty , sl@0: DirNotEmpty_DirNotEmpty , sl@0: DirNotEmpty_File , sl@0: Dir_NotEmpty , sl@0: File_Dir , sl@0: File_File , sl@0: Dir_File , sl@0: Invalid_Path_EnotDir , sl@0: Invalid_Path_Eent , sl@0: Permission_Denied , sl@0: } ; sl@0: sl@0: sl@0: GLREF_C TInt GetFullPath(TParse& aParse, const TText16* upath, TDes* aFileName); sl@0: GLREF_C TInt GetFullFile(TFileName& aName, const TText16* upath, RFs& aSession); sl@0: GLDEF_C TInt Find_Error(const wchar_t *name, RSessionBase& aSession) ; sl@0: GLDEF_C TInt Find_Error(TFileName& aName, RSessionBase& aSession) ; sl@0: IMPORT_C int MapError(TInt err, int& anErrno); sl@0: int StrCmp(const char *aDst, const char *aSrc); sl@0: wchar_t* WcsCpy(wchar_t* __restrict aDst, const wchar_t * __restrict aSrc); sl@0: int WcsCmp(const wchar_t* aDst, const wchar_t* aSrc); sl@0: size_t WcsLen(wchar_t* aSrc); sl@0: size_t StrlCopy(char *aDst, const char *aSrc, size_t aSize); sl@0: char* StrCopy(char* aDst, const char* aSrc); sl@0: GLDEF_C TInt Get_PathCombinations(TFileName& aOldName, TFileName& aNewName ,RFs & aSession) ; sl@0: #ifdef SYMBIAN_OE_LIBRT sl@0: TInt GeneratePathKey(const TDesC& aName); sl@0: #endif //SYMBIAN_OE_LIBRT sl@0: TInt ConvertUnicodeToUtf8(const TDesC16 &aUnicode,HBufC8*& aUtf8Buf,TInt &aErrNum); sl@0: GLDEF_C TInt GetFullFileUtf8(TDes8 &aName, const char* apath, RFs& aSession); sl@0: #endif /* LPOSIX_H */