sl@0: // Copyright (c) 1995-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 the License "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: // f32\sfsrv\cl_entry.cpp sl@0: // sl@0: // sl@0: sl@0: #include "cl_std.h" sl@0: sl@0: sl@0: /** sl@0: Default constructor. sl@0: */ sl@0: EXPORT_C TVolumeInfo::TVolumeInfo() sl@0: { sl@0: Mem::FillZ(this, sizeof(TVolumeInfo)); //-- zero-fill itself sl@0: new(&iName)TBufC; //-- initialise broken descriptor sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TBool TEntry::IsReadOnly() const sl@0: /** sl@0: Tests whether the file or directory is read-only. sl@0: sl@0: @return ETrue if entry is read-only, EFalse if not. sl@0: sl@0: @see KEntryAttReadOnly sl@0: */ sl@0: { sl@0: return(iAtt&KEntryAttReadOnly); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TBool TEntry::IsHidden() const sl@0: /** sl@0: Tests whether the file or directory is hidden. sl@0: sl@0: @return ETrue if entry is hidden, EFalse if not. sl@0: sl@0: @see KEntryAttHidden sl@0: */ sl@0: { sl@0: sl@0: return(iAtt&KEntryAttHidden); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TBool TEntry::IsSystem() const sl@0: /** sl@0: Tests whether the file or directory has the system attribute set. sl@0: sl@0: @return ETrue if entry is a system entry, EFalse if not. sl@0: sl@0: @see KEntryAttSystem sl@0: */ sl@0: { sl@0: sl@0: return(iAtt&KEntryAttSystem); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TBool TEntry::IsDir() const sl@0: /** sl@0: Tests whether the entry is a directory. sl@0: sl@0: @return ETrue if entry indicates a directory, EFalse if not. sl@0: sl@0: @see KEntryAttDir sl@0: */ sl@0: { sl@0: sl@0: return(iAtt&KEntryAttDir); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TBool TEntry::IsArchive() const sl@0: /** sl@0: Tests whether the file is an archive file. sl@0: sl@0: @return ETrue if file is archive, EFalse if not. sl@0: sl@0: @see KEntryAttArchive sl@0: */ sl@0: { sl@0: sl@0: return(iAtt&KEntryAttArchive); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TEntryArray::TEntryArray() sl@0: : iCount(0) sl@0: /** sl@0: Default constructor. sl@0: sl@0: Initialises its count of contained TEntry objects to zero. sl@0: */ sl@0: {} sl@0: sl@0: sl@0: sl@0: sl@0: EXPORT_C TInt TEntryArray::Count() const sl@0: /** sl@0: Gets the number of entries in the array. sl@0: sl@0: @return The number of entries in the array. sl@0: */ sl@0: { sl@0: sl@0: if (iCount==KCountNeeded) sl@0: { sl@0: const TEntry* pE=(const TEntry*)iBuf.Ptr(); sl@0: const TEntry* pEnd=PtrAdd(pE,iBuf.Length()); sl@0: TInt c=0; sl@0: while (pE