diff -r 2669f8761a99 -r fbd2e7cec7ef XDMEngine/inc/XdmStaticUtils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/XDMEngine/inc/XdmStaticUtils.h Wed Sep 01 12:23:14 2010 +0100 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: XDM Engine static utils +* +*/ + + + + +#ifndef __XDMSTATICUTILS__ +#define __XDMSTATICUTILS__ + +#include + +const TInt KBackSlash = 92; + +class RFs; + +// CLASS DECLARATION +class XdmStaticUtils + + { + public: + + /** + * Check whether a file already exists. + * + * @param RFs& An opened file session + * @param TDesC& The file name to check + * @return TBool Is the file already there + */ + IMPORT_C static TBool CheckFileExistsL( RFs& aFileSession, const TDesC& aFileName ); + + /** + * Generate a new file name unique in the context + * of the folder in which it resides + * + * @param RFs& An opened file session + * @param TDesC& The file name to check + * @param TDesC& The extension in the filename + * @return HBufC* The generated filename + */ + IMPORT_C static HBufC* GenerateFileNameL( RFs& aFileSession, const TDesC& aFileName, + const TDesC& aExtension ); + + /** + * Clean up a directory + * + * @param RFs& An opened file session + * @param TDesC& The directory to clean up + * @return void + */ + IMPORT_C static void CleanUpDirectoryL( RFs& aFileSession, const TDesC& aDirectory ); + + }; + +#endif //__XDMCREDENTIALS__ + +// End of File