Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
f32file.h
Go to the documentation of this file.
1// Copyright (c) 1995-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 the License "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".
7//
8// Initial Contributors:
9// Nokia Corporation - initial contribution.
10//
11// Contributors:
12//
13// Description:
14//
15
22#if !defined(__F32FILE_H__)
23#define __F32FILE_H__
24
25#if !defined(__E32BASE_H__)
26#include <e32base.h>
27#endif
28
29#ifndef SYMBIAN_ENABLE_PUBLIC_PLATFORM_HEADER_SPLIT
30// Old implementation including platform e32svr.h (which includes the several other platform headers)...
31#if !defined(__E32SVR_H__)
32#include <e32svr.h>
33#endif
34#include <e32ldr.h>
35#else
36// New implementation including only the public headers needed for f32file.h...
37#include <e32ldr.h>
38// And the public headers previously included via e32svr.h but otherwise not needed for f32file.h...
39#include <e32def.h>
40#include <e32event.h>
41#include <e32debug.h>
42#include <e32keys.h>
43#endif
44
45
46//-------------------------------------------------------------------------------------------------------------------
47/*
48 A brief description of the structure of paths and filenames in the Symbian OS.
49
50 A full file or directory name consists of four components:
51 - the drive: a single letter followed by a colon.
52 - the path, starting with a backslash and ending with the final backslash in the name. The backslashes divide the path into components.
53 - the file name: everything from the character following the last backslash to the character preceding the final dot.
54 - optional extension, which consists of everything after the final dot.
55
56 A directory is identified by a trailing slash: thus, 'c:\\wrd\\' indicates a directory, but 'c:\\wrd' indicates a file with no extension.
57
58 There are some restrictions that apply to the file or directory names.
59 - full name should not contain wild cards ('?' or '*' characters)
60 - file or directory name should not contain illegal characters like '<', '>', ':', '"', '/', '|' and '\000'.
61 - file or directory name containing only white space characters is illegal.
62 - white space characters are those one that are identified by TChar::IsSpace(). ASCII and all UNICODE white space characters
63 are considered equivalent. E.g. characters with codes 0x20, U+0020, U+3000, U+2009, etc. considered as equivalent white spaces.
64*/
65//-------------------------------------------------------------------------------------------------------------------
66
67
74const TInt KDefaultDrive=KMaxTInt;
75
76
77
87const TInt KDriveAbsent=0x00;
88
89
90
91
101
102
103
104
114const TInt KEntryArraySize=(0x200*sizeof(TText));
115
116
117
118
125const TInt KPathDelimiter='\\';
126
127
128
129
136const TInt KDriveDelimiter=':';
138
139
140
147const TInt KExtDelimiter='.';
148
149
151
158const TInt KMaxDrives=26;
159
160
167const TInt KMaxProxyDrives=KMaxDrives-KMaxLocalDrives;
168
169
182typedef TBuf8<KMaxDrives> TDriveList;
183
184
185
194const TInt KMaxDriveName=0x02;
195
196
197
198
212
213
214
215
223const TInt KMaxFSNameLength=0x0020;
224
225
226
227
238
239
240
247const TUint KEntryAttNormal=0x0000;
248
249
250
258const TUint KEntryAttReadOnly=0x0001;
259
260
261
262
269const TUint KEntryAttHidden=0x0002;
270
271
272
273
280const TUint KEntryAttSystem=0x0004;
281
282
283
284
291const TUint KEntryAttVolume=0x0008;
293
294
295
302const TUint KEntryAttDir=0x0010;
303
304
306
313const TUint KEntryAttArchive=0x0020;
314
315
316
317
324const TUint KEntryAttXIP=0x0080;
325
326
327
328
343const TUint KEntryAttRemote=0x0100;
345
346
347
399const TUint KEntryAttMaskFileSystemSpecific=0x00FF0000;
400
401
402
403
419
420
421
422
423
435const TUint KEntryAttMaskSupported=0x3f;
436
437
438
439
455const TUint KEntryAttMatchExclusive=0x40000000;
456
457
458
459
470const TUint KEntryAttUnique=0x01000000;
471
472
473
474
499const TUint KEntryAttMatchExclude=0x08000000;
500
501
502
503
515const TUint KEntryAttAllowUid=0x10000000;
516
517
518
519
530const TUint KEntryAttPacked = 0x01000000;
531
532
537const TUint KMaxMapsPerCall = 0x8;
538
539
540
541
542enum TNotifyType
559 {
563 ENotifyAll=0x01,
564
565
569 ENotifyEntry=0x02,
570
571
577 ENotifyFile=0x04,
578
579
584 ENotifyDir=0x08,
585
586
593
597 ENotifyWrite=0x20,
598
599
603 ENotifyDisk=0x40
604 };
605
615 {
618
624
627 };
628
637 {
642
646 EFileCacheReadOn = 0x02,
647
652
656 EFileCacheReadAheadOn = 0x08,
662
666 EFileCacheWriteOn = 0x20,
667 };
668
678 {
684
690
697
705
714 };
715
730 {
731public:
740 TInt iBlockSize;
741
752 TInt iClusterSize;
753
754
769 TInt iRecReadBufSize;
784 TInt iRecWriteBufSize;
786
792 TUint64 iMaxSupportedFileSize;
793
794private:
795 /*
796 Reserved space for future use
797 */
798 TInt iReserved[2];
799 };
800
801enum TDriveNumber
808 {
815 };
816
817
818
819
820enum TEntryKey
831 {
835 ESortNone=0,
836
837
845
846
859
867
868
878
879
898
899
905 EDirsFirst=0x100,
906
907
914
915
923
924
930 EDescending=0x400,
931
932
939 EDirDescending=0x800
940 };
941
942
943
945enum TFileMode
1055 {
1064
1065
1074
1075
1086
1087
1098
1099
1103 EFileStream=0,
1104
1105
1109 EFileStreamText=0x100,
1110
1111
1115 EFileRead=0,
1116
1117
1123 EFileWrite=0x200,
1124
1132 EFileReadAsyncAll=0x400,
1133
1137 EFileWriteBuffered =0x00000800,
1138
1143
1147 EFileReadBuffered =0x00002000,
1148
1153
1157 EFileReadAheadOn =0x00008000,
1158
1162 EFileReadAheadOff =0x00010000,
1163
1167 EDeleteOnClose =0x00020000,
1168
1175 EFileBigFile =0x00040000,
1200 EFileSequential =0x00080000
1201
1203
1204
1205
1206
1215const TUint KFileShareMask=0xff;
1217
1218
1219
1220enum TFormatMode
1227 {
1237
1238
1248
1249
1256 EFullFormat=0,
1257
1258
1264 EQuickFormat=0x100,
1265
1266
1274 ESpecialFormat=0x200,
1275
1279 EForceErase=0x400,
1280
1289 EForceFormat = 0x800,
1290
1291 };
1292
1293
1294
1295
1308 {
1315
1316
1320 ESeekStart,
1321
1322
1327
1328
1332 ESeekEnd
1333 };
1334
1340class TBlockMapEntry : public TBlockMapEntryBase
1341 {
1342public:
1343 IMPORT_C TBlockMapEntry();
1344 IMPORT_C void SetNumberOfBlocks( TUint aNumberOfBlocks );
1345 IMPORT_C void SetStartBlock( TUint aStartBlock );
1346 };
1353typedef TBuf8<KMaxMapsPerCall*sizeof(TBlockMapEntry)> TBlockArrayDes;
1354
1355struct SBlockMapInfo : public SBlockMapInfoBase
1356 {
1358 };
1359
1364enum TBlockMapUsage
1365 {
1366 /* */
1368 /* */
1370 };
1371
1398 {
1399public:
1400 IMPORT_C TEntry();
1401 IMPORT_C TEntry(const TEntry& aEntry);
1402 IMPORT_C TEntry& operator=(const TEntry& aEntry);
1403 IMPORT_C TBool IsReadOnly() const;
1404 IMPORT_C TBool IsHidden() const;
1405 IMPORT_C TBool IsSystem() const;
1406 IMPORT_C TBool IsDir() const;
1407 IMPORT_C TBool IsArchive() const;
1408 inline const TUid& operator[](TInt anIndex) const;
1409 inline TBool IsUidPresent(TUid aUid) const;
1410 inline TBool IsTypeValid() const;
1411 inline TUid MostDerivedUid() const;
1412 IMPORT_C TInt64 FileSize() const;
1413 inline void SetFileSize(TInt64 aFileSize);
1414
1415private:
1416 inline void Copy(const TEntry& aEntry);
1417 inline void Unpack();
1419public:
1429 TUint iAtt;
1436 TInt iSize;
1437
1438
1449
1450
1458
1459private:
1460 TUint32 iSizeHigh;
1464 TUint32 iReserved;
1465 };
1466
1467
1468
1469
1470class RDir;
1471class TEntryArray
1485 {
1486public:
1487 IMPORT_C TEntryArray();
1488 IMPORT_C TInt Count() const;
1489 IMPORT_C const TEntry& operator[](TInt anIndex) const;
1490private:
1491 TInt iCount;
1492 TInt iIndex;
1493 const TEntry* iPos;
1494 TBuf8<KEntryArraySize> iBuf;
1495 friend class RDir;
1496 friend class RFs;
1497 friend class TRawEntryArray;
1512 {
1513public:
1517 TMediaType iType;
1518
1519
1523 TBatteryState iBattery;
1524
1525
1537 TUint iDriveAtt;
1538
1550 TUint iMediaAtt;
1551
1552
1556 TConnectionBusType iConnectionBusType;
1557 };
1558
1559
1560
1561
1582public:
1583 IMPORT_C TVolumeInfo();
1584
1591
1592
1597
1598
1603 TInt64 iSize;
1604
1605
1609 TInt64 iFree;
1610
1611
1620
1627
1639 TUint8 iVolSizeAsync : 1;
1640
1641private:
1645 TUint8 i8Reserved1;
1646 TUint16 i16Reserved1;
1647 TUint32 i32Reserved1;
1648 TUint32 i32Reserved2;
1649 };
1650
1652
1653
1654class TDriveUnit
1668 {
1669public:
1670 inline TDriveUnit() {};
1671 IMPORT_C TDriveUnit(TInt aDrive);
1672 IMPORT_C TDriveUnit(const TDesC& aDrive);
1673 IMPORT_C TDriveUnit& operator=(TInt aDrive);
1674 IMPORT_C TDriveUnit& operator=(const TDesC& aDrive);
1675 inline operator TInt() const;
1676 IMPORT_C TDriveName Name() const;
1677private:
1678 TInt iDrive;
1679 };
1681
1682
1683
1684class RFs;
1685//
1686class TParseBase
1713 {
1714private:
1715 struct SField {TUint8 pos;TUint8 len;TUint8 present;TUint8 filler;};
1716 enum TField {EDrive,EPath,EName,EExt,EMaxFields};
1717 enum TWild {EWildName=0x01,EWildExt=0x02,EWildEither=0x04,EIsRoot=0x08,EWildIsKMatchOne=0x10,EWildIsKMatchAny=0x20};
1718public:
1719 IMPORT_C TParseBase();
1720 IMPORT_C TInt PopDir();
1721 IMPORT_C TInt AddDir(const TDesC& aName);
1722 IMPORT_C const TDesC& FullName() const;
1723 IMPORT_C TPtrC Drive() const;
1724 IMPORT_C TPtrC Path() const;
1725 IMPORT_C TPtrC DriveAndPath() const;
1726 IMPORT_C TPtrC Name() const;
1727 IMPORT_C TPtrC Ext() const;
1728 IMPORT_C TPtrC NameAndExt() const;
1729 IMPORT_C TBool DrivePresent() const;
1730 IMPORT_C TBool PathPresent() const;
1731 IMPORT_C TBool NamePresent() const;
1732 IMPORT_C TBool ExtPresent() const;
1733 IMPORT_C TBool NameOrExtPresent() const;
1734 IMPORT_C TBool IsRoot() const;
1735 IMPORT_C TBool IsWild() const;
1736 IMPORT_C TBool IsKMatchOne() const;
1737 IMPORT_C TBool IsKMatchAny() const;
1738 IMPORT_C TBool IsNameWild() const;
1739 IMPORT_C TBool IsExtWild() const;
1740protected:
1741 virtual TDes& NameBuf() = 0; // Reference to derived class descriptor containing the filename.
1742 virtual const TDesC& NameBufC() const = 0; // const reference to derived class descriptor containing the filename.
1743 TInt Set(const TDesC* aName,const TDesC* aRelated,const TDesC* aDefault,TBool allowWild);
1744private:
1745 TInt ParseDrive(TLex& aName,TBool& aDone);
1746 TInt ParsePath(TLex& aName,TBool& aDone);
1747 TInt ParseName(TLex& aName,TBool& aDone);
1748 TInt ParseExt(TLex& aName,TBool& aDone);
1749protected:
1750 TInt16 iMod; // Non-zero indicates File name modification functionality is enabled.
1751private:
1752 TInt16 iWild;
1753 SField iField[EMaxFields];
1754 };
1755
1756
1757
1758
1759class TParsePtr : public TParseBase
1778public:
1779 IMPORT_C TParsePtr(TDes& aName);
1780protected:
1781 IMPORT_C TDes& NameBuf();
1782 IMPORT_C const TDesC& NameBufC() const;
1783private:
1784 TPtr iNameBuf;
1785 };
1786
1788
1789
1790class TParsePtrC : public TParseBase
1809 {
1810public:
1811 IMPORT_C TParsePtrC(const TDesC& aName);
1812protected:
1813 IMPORT_C TDes& NameBuf();
1814 IMPORT_C const TDesC& NameBufC() const;
1815private:
1816 TPtrC iNameBuf;
1817 };
1818
1819
1820
1821
1822class TParse : public TParseBase
1840public:
1841 IMPORT_C TParse();
1842 IMPORT_C TInt Set(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault);
1843 IMPORT_C TInt SetNoWild(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault);
1844protected:
1845 IMPORT_C TDes& NameBuf();
1846 IMPORT_C const TDesC& NameBufC() const;
1847private:
1848 TFileName iNameBuf;
1849 };
1850
1851
1852
1854class CDir : public CBase
1863 {
1864public:
1865 IMPORT_C virtual ~CDir();
1866 IMPORT_C TInt Count() const;
1867 IMPORT_C const TEntry& operator[](TInt anIndex) const;
1868 IMPORT_C TInt Sort(TUint aEntrySortKey);
1869protected:
1870 IMPORT_C CDir();
1871 IMPORT_C static CDir* NewL();
1872 IMPORT_C void AddL(const TEntry& anEntry);
1873 IMPORT_C void ExtractL(TBool aRemove,CDir*& aDir);
1874 IMPORT_C void Compress();
1875protected:
1877 friend class RFs;
1878 friend class TOpenFileScan;
1879 };
1880
1881
1882#if defined SYMBIAN_PRIVATE_EFSRV
1883 #define EFSRV_EXPORT_C
1884 #define EFSRV_IMPORT_C
1885#else
1886 #define EFSRV_EXPORT_C EXPORT_C
1887 #define EFSRV_IMPORT_C IMPORT_C
1888#endif
1889
1890// forward declarations from e32ldr_private.h
1891class RFileClamp;
1892
1893class RFs : public RSessionBase
1964public:
1965 EFSRV_IMPORT_C TInt Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots);
1966 EFSRV_IMPORT_C void Close();
1968 EFSRV_IMPORT_C TInt AddFileSystem(const TDesC& aFileName) const;
1969 EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
1970 EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive, TBool aIsSync) const;
1971 EFSRV_IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,TInt aDrive,TBool& aIsMountSuccess) const;
1972 EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive);
1973 EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive, TBool aIsSync);
1974 EFSRV_IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive,TBool& aIsMountSuccess) const;
1975 EFSRV_IMPORT_C TInt DismountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
1976 EFSRV_IMPORT_C TInt RemoveFileSystem(const TDesC& aFileSystemName) const;
1977 EFSRV_IMPORT_C TInt FileSystemName(TDes& aName,TInt aDrive) const;
1978 EFSRV_IMPORT_C TInt AddExtension(const TDesC& aFileName);
1979 EFSRV_IMPORT_C TInt MountExtension(const TDesC& aExtensionName,TInt aDrive);
1980 EFSRV_IMPORT_C TInt DismountExtension(const TDesC& aExtensionName,TInt aDrive);
1981 EFSRV_IMPORT_C TInt RemoveExtension(const TDesC& aExtensionName);
1982 EFSRV_IMPORT_C TInt ExtensionName(TDes& aExtensionName,TInt aDrive,TInt aPos);
1983 EFSRV_IMPORT_C TInt RemountDrive(TInt aDrive,const TDesC8* aMountInfo=NULL,TUint aFlags=0);
1985 EFSRV_IMPORT_C void NotifyChange(TNotifyType aType,TRequestStatus& aStat,const TDesC& aPathName);
1988 EFSRV_IMPORT_C void NotifyDiskSpace(TInt64 aThreshold,TInt aDrive,TRequestStatus& aStat);
1991 EFSRV_IMPORT_C TInt DriveList(TDriveList& aList) const;
1992 EFSRV_IMPORT_C TInt DriveList(TDriveList& aList, TUint aFlags) const;
1993 EFSRV_IMPORT_C TInt Drive(TDriveInfo& anInfo,TInt aDrive=KDefaultDrive) const;
1994 EFSRV_IMPORT_C TInt Volume(TVolumeInfo& aVol,TInt aDrive=KDefaultDrive) const;
1995 EFSRV_IMPORT_C void Volume(TVolumeInfo& aVol,TInt aDrive, TRequestStatus& aStat) const;
1996 EFSRV_IMPORT_C TInt SetVolumeLabel(const TDesC& aName,TInt aDrive=KDefaultDrive);
1997 EFSRV_IMPORT_C TInt Subst(TDes& aPath,TInt aDrive=KDefaultDrive) const;
1998 EFSRV_IMPORT_C TInt SetSubst(const TDesC& aPath,TInt aDrive=KDefaultDrive);
1999 EFSRV_IMPORT_C TInt RealName(const TDesC& aName,TDes& aResult) const;
2000 EFSRV_IMPORT_C TInt GetMediaSerialNumber(TMediaSerialNumber& aSerialNum, TInt aDrive);
2001 EFSRV_IMPORT_C TInt SessionPath(TDes& aPath) const;
2002 EFSRV_IMPORT_C TInt SetSessionPath(const TDesC& aPath);
2003 EFSRV_IMPORT_C TInt Parse(const TDesC& aName,TParse& aParse) const;
2004 EFSRV_IMPORT_C TInt Parse(const TDesC& aName,const TDesC& aRelated,TParse& aParse) const;
2005 EFSRV_IMPORT_C TInt MkDir(const TDesC& aPath);
2006 EFSRV_IMPORT_C TInt MkDirAll(const TDesC& aPath);
2007 EFSRV_IMPORT_C TInt RmDir(const TDesC& aPath);
2008 EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList) const;
2009 EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList) const;
2010 EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,const TUidType& anEntryUid,TUint anEntrySortKey,CDir*& aFileList) const;
2011 EFSRV_IMPORT_C TInt Delete(const TDesC& aName);
2012 EFSRV_IMPORT_C TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
2013 EFSRV_IMPORT_C TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
2014 EFSRV_IMPORT_C TInt Att(const TDesC& aName,TUint& aAttValue) const;
2015 EFSRV_IMPORT_C TInt SetAtt(const TDesC& aName,TUint aSetAttMask,TUint aClearAttMask);
2016 EFSRV_IMPORT_C TInt Modified(const TDesC& aName,TTime& aTime) const;
2017 EFSRV_IMPORT_C TInt SetModified(const TDesC& aName,const TTime& aTime);
2018 EFSRV_IMPORT_C TInt Entry(const TDesC& aName,TEntry& anEntry) const;
2019 EFSRV_IMPORT_C TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
2020private:
2021 EFSRV_IMPORT_C TInt ReadFileSection_RESERVED(const TDesC& aName,TInt aPos,TDes8& aDes,TInt aLength) const;
2022public:
2023 EFSRV_IMPORT_C static TBool IsValidDrive(TInt aDrive);
2024 EFSRV_IMPORT_C static TInt CharToDrive(TChar aChar,TInt& aDrive);
2025 EFSRV_IMPORT_C static TInt DriveToChar(TInt aDrive,TChar& aChar);
2026 EFSRV_IMPORT_C static TBool IsRomAddress(TAny* aAny);
2029 EFSRV_IMPORT_C TInt SetSystemDrive(TDriveNumber aSystemDrive);
2032 EFSRV_IMPORT_C TInt ResourceCount() const;
2033 EFSRV_IMPORT_C TInt IsFileOpen(const TDesC& aFile,TBool& anAnswer) const;
2034 EFSRV_IMPORT_C TInt CheckDisk(const TDesC& aDrive) const;
2035 EFSRV_IMPORT_C TInt ScanDrive(const TDesC& aDrive) const;
2036 EFSRV_IMPORT_C TInt GetShortName(const TDesC& aLongName,TDes& aShortName) const;
2037 EFSRV_IMPORT_C TInt GetLongName(const TDesC& aShortName,TDes& aLongName) const;
2039 EFSRV_IMPORT_C void SetNotifyUser(TBool aValue);
2040 EFSRV_IMPORT_C TUint8* IsFileInRom(const TDesC& aFileName) const;
2041 EFSRV_IMPORT_C TBool IsValidName(const TDesC& anEntryName) const;
2042 EFSRV_IMPORT_C TBool IsValidName(const TDesC& aFileName,TText& aBadChar) const;
2043 EFSRV_IMPORT_C TInt GetDriveName(TInt aDrive,TDes& aDriveName) const;
2044 EFSRV_IMPORT_C TInt SetDriveName(TInt aDrive,const TDesC& aDriveName);
2045 EFSRV_IMPORT_C TInt LoaderHeapFunction(TInt aFunction, TAny *aArg1=NULL, TAny *aArg2=NULL);
2046 IMPORT_C TInt SetErrorCondition(TInt anError,TInt aCount=0);
2047 EFSRV_IMPORT_C TInt SetDebugRegister(TInt aVal);
2048 EFSRV_IMPORT_C TInt SetAllocFailure(TInt aAllocNum);
2049 EFSRV_IMPORT_C void DebugNotify(TInt aDrive,TUint aNotifyType,TRequestStatus& aStat);
2050 EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand);
2051 EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1);
2052 EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1,TDes8& aParam2);
2053 EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TAny* aParam1,TAny* aParam2);
2054 EFSRV_IMPORT_C TInt LockDrive(TInt aDrv, const TMediaPassword &aOld, const TMediaPassword &aNew, TBool aStr);
2055 EFSRV_IMPORT_C TInt UnlockDrive(TInt aDrv, const TMediaPassword &Pswd, TBool aStr);
2056 EFSRV_IMPORT_C TInt ClearPassword(TInt aDrv, const TMediaPassword &aPswd);
2057 EFSRV_IMPORT_C TInt ErasePassword(TInt aDrv);
2058 EFSRV_IMPORT_C TInt SetSessionToPrivate(TInt aDrive);
2059 EFSRV_IMPORT_C TInt PrivatePath(TDes& aPath);
2060 EFSRV_IMPORT_C TInt CreatePrivatePath(TInt aDrive);
2062 EFSRV_IMPORT_C TInt SetLocalDriveMapping(const TDesC8& aMapping);
2063
2065
2067 enum TFinaliseDrvMode
2068 {
2069 EFinal_RW,
2070 EFinal_RO,
2072 };
2073
2074 EFSRV_IMPORT_C TInt FinaliseDrive(TInt aDriveNo, TFinaliseDrvMode aMode) const;
2075
2076 EFSRV_IMPORT_C TInt SwapFileSystem(const TDesC& aOldFileSystemName,const TDesC& aNewFileSystemName,TInt aDrive) const;
2077 EFSRV_IMPORT_C TInt ReserveDriveSpace(TInt aDriveNo, TInt aSpace);
2081 EFSRV_IMPORT_C TInt AddPlugin(const TDesC& aFileName) const;
2082 EFSRV_IMPORT_C TInt RemovePlugin(const TDesC& aPluginName) const;
2083 EFSRV_IMPORT_C TInt PluginName(TDes& aPluginName,TInt aDrive,TInt aPos);
2085 EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName) const;
2086 EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive) const;
2087 EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive, TInt aPos) const;
2089 EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName) const;
2090 EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive) const;
2091 EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive,TInt aPos) const;
2096 EFSRV_IMPORT_C TInt AllowDismount(TInt aDrive) const;
2097 EFSRV_IMPORT_C TInt SetStartupConfiguration(TInt aCommand,TAny* aParam1,TAny* aParam2) const;
2098 EFSRV_IMPORT_C TInt AddCompositeMount(const TDesC& aFileSystemName,TInt aLocalDriveToMount,TInt aCompositeDrive, TBool aSync) const;
2099 EFSRV_IMPORT_C TInt SetNotifyChange(TBool aNotifyChange);
2100 EFSRV_IMPORT_C TInt QueryVolumeInfoExt(TInt aDrive, TQueryVolumeInfoExtCmd aCommand, TDes8& aInfo) const;
2101 EFSRV_IMPORT_C TInt VolumeIOParam(TInt aDriveNo, TVolumeIOParamInfo& aParamInfo) const;
2102 EFSRV_IMPORT_C TInt FileSystemSubType(TInt aDriveNo, TDes& aName) const;
2103 EFSRV_IMPORT_C TInt InitialisePropertiesFile(const TPtrC8& aPtr) const;
2105 IMPORT_C TInt AddProxyDrive(const TDesC& aFileName);
2106 IMPORT_C TInt RemoveProxyDrive(const TDesC& aDriveName);
2108 template <class T0,class T1> inline TInt MountProxyDrive(const TUint aDrive, const TDesC& aName, T0 a0, T1 a1)
2109 { return(DoMountProxyDrive(TIpcArgs(aDrive, &aName, a0, a1))); }
2110 IMPORT_C TInt DismountProxyDrive(const TUint aDrive);
2112 TInt Unclamp(const RFileClamp& aHandle);
2114 EFSRV_IMPORT_C TInt ReadFileSection(const TDesC& aName,TInt64 aPos,TDes8& aDes,TInt aLength) const;
2122 public:
2124 inline TNameValidParam(TBool aUseSessionPath = EFalse);
2133 };
2134
2135 inline TError ErrorCode() const;
2136 inline void UseSessionPath(TBool aUseSessionPath);
2137 inline TUint InvalidCharPos() const;
2138 friend class TFsIsValidName;
2139 private:
2140 TError iError;
2141 TBool iUseSessionPath;
2142 TUint iInvalidCharPos;
2144 EFSRV_IMPORT_C TBool IsValidName(const TDesC& aName, TNameValidParam& aParam );
2147 enum
2149 KRootFileSystem = 0x00800000,
2153 EFSRV_IMPORT_C TInt SupportedFileSystemName(TDes& aName, TInt aDrive, TInt aFsEnumerator) const;
2181
2182protected:
2183 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
2184
2185private:
2186 void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList,RDir& aDir) const;
2187 void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
2188 void GetDirL(const TDesC& aMatchName,const TUidType& aUidType,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
2189 void DoGetDirL(TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
2190 TInt GetOpenFileList(TInt& aSessionNum,TInt& aLocalPos,TThreadId& aThreadId,TEntryArray& anArray) const;
2192 IMPORT_C TInt DoMountProxyDrive(const TIpcArgs& ipcArgs);
2193
2194 friend class TOpenFileScan;
2195 friend class RFsPlugin;
2197
2199//-------------------------------------------------------------------------------------------------------------------
2217class TVolFormatParam
2219public:
2220 inline TVolFormatParam();
2221 inline void Init();
2222
2223 inline void SetFileSystemName(const TDesC& aFsName);
2224
2225 static inline TUint32 CalcFSNameHash(const TDesC& aFsName);
2226 inline TUint32 FSNameHash() const;
2228 inline TBool SomeParamsSet() const;
2229
2230
2231protected:
2232
2234 enum {KMaxDataSlots = 64};
2235
2236 inline void SetVal(TUint aIndex, TUint32 aVal);
2237 inline TUint32 GetVal(TUint aIndex) const;
2238
2239
2240public:
2241 enum {KUId = 0x820116A2};
2247 const TUint32 iUId;
2249private:
2250 TUint32 iFSysNameHash;
2251 TBool iParamsSet : 1;
2252 TUint32 iData[KMaxDataSlots];
2253 };
2254
2255__ASSERT_COMPILE(_FOFF(TVolFormatParam, iUId) == 0);
2256
2260
2261
2263
2264#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
2320#else
2397#endif
2398
2399
2400class RFile : public RSubSessionBase
2401 {
2402public:
2403 EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aName,TUint aFileMode);
2404 EFSRV_IMPORT_C void Close();
2405 EFSRV_IMPORT_C TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode);
2406 EFSRV_IMPORT_C TInt Replace(RFs& aFs,const TDesC& aName,TUint aFileMode);
2407 EFSRV_IMPORT_C TInt Temp(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode);
2408 EFSRV_IMPORT_C TInt Read(TDes8& aDes) const;
2409 EFSRV_IMPORT_C void Read(TDes8& aDes,TRequestStatus& aStatus) const;
2410 EFSRV_IMPORT_C TInt Read(TDes8& aDes,TInt aLength) const;
2411 EFSRV_IMPORT_C void Read(TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
2412 EFSRV_IMPORT_C TInt Read(TInt aPos,TDes8& aDes) const;
2413 EFSRV_IMPORT_C void Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) const;
2414 EFSRV_IMPORT_C TInt Read(TInt aPos,TDes8& aDes,TInt aLength) const;
2415 EFSRV_IMPORT_C void Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
2416 EFSRV_IMPORT_C void ReadCancel(TRequestStatus& aStatus) const;
2417 EFSRV_IMPORT_C void ReadCancel() const;
2418 EFSRV_IMPORT_C TInt Write(const TDesC8& aDes);
2419 EFSRV_IMPORT_C void Write(const TDesC8& aDes,TRequestStatus& aStatus);
2420 EFSRV_IMPORT_C TInt Write(const TDesC8& aDes,TInt aLength);
2421 EFSRV_IMPORT_C void Write(const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
2422 EFSRV_IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes);
2423 EFSRV_IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus);
2424 EFSRV_IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes,TInt aLength);
2425 EFSRV_IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
2426 EFSRV_IMPORT_C TInt Lock(TInt aPos,TInt aLength) const;
2427 EFSRV_IMPORT_C TInt UnLock(TInt aPos,TInt aLength) const;
2428 EFSRV_IMPORT_C TInt Seek(TSeek aMode,TInt& aPos) const;
2429 EFSRV_IMPORT_C TInt Flush();
2430 EFSRV_IMPORT_C void Flush(TRequestStatus& aStatus);
2431 EFSRV_IMPORT_C TInt Size(TInt& aSize) const;
2432 EFSRV_IMPORT_C TInt SetSize(TInt aSize);
2433 EFSRV_IMPORT_C TInt Att(TUint& aAttValue) const;
2434 EFSRV_IMPORT_C TInt SetAtt(TUint aSetAttMask,TUint aClearAttMask);
2435 EFSRV_IMPORT_C TInt Modified(TTime& aTime) const;
2436 EFSRV_IMPORT_C TInt SetModified(const TTime& aTime);
2437 EFSRV_IMPORT_C TInt Set(const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
2438 EFSRV_IMPORT_C TInt ChangeMode(TFileMode aNewMode);
2439 EFSRV_IMPORT_C TInt Rename(const TDesC& aNewName);
2440 EFSRV_IMPORT_C TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const;
2441 EFSRV_IMPORT_C TInt Adopt(RFs& aFs, TInt aHandle);
2442 EFSRV_IMPORT_C TInt AdoptFromClient(const RMessage2& aMsg, TInt aFsHandleIndex, TInt aFileHandleIndex);
2443 EFSRV_IMPORT_C TInt AdoptFromServer(TInt aFsHandle, TInt aFileHandle);
2444 EFSRV_IMPORT_C TInt AdoptFromCreator(TInt aFsIndex, TInt aFileHandleIndex);
2445 EFSRV_IMPORT_C TInt Name(TDes& aName) const;
2446 EFSRV_IMPORT_C TInt TransferToServer(TIpcArgs& aIpcArgs, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
2447 EFSRV_IMPORT_C TInt TransferToClient(const RMessage2& aMsg, TInt aFileHandleIndex) const;
2448 EFSRV_IMPORT_C TInt TransferToProcess(RProcess& aProcess, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
2449 EFSRV_IMPORT_C TInt Duplicate(const RFile& aFile, TOwnerType aType=EOwnerProcess);
2450 EFSRV_IMPORT_C TInt FullName(TDes& aName) const;
2451 EFSRV_IMPORT_C TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos=-1, TInt aBlockMapusage=EBlockMapUsagePaging) const;
2452 TInt Clamp(RFileClamp& aHandle);
2453
2454protected:
2455 // RSubSessionBase overrides
2456 TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
2457 void CloseSubSession(TInt aFunction);
2458 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
2459
2460 TInt DuplicateHandle(TInt& aSubSessionHandle) const;
2461
2462 friend class RFilePlugin;
2463 };
2464
2465#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
2466#include <f32file64.h>
2467#endif
2468
2469class RDir : public RSubSessionBase
2499 {
2500public:
2501 EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,const TUidType& aUidType);
2502 EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,TUint anAttMask);
2503 EFSRV_IMPORT_C void Close();
2504 EFSRV_IMPORT_C TInt Read(TEntryArray& anArray) const;
2505 EFSRV_IMPORT_C void Read(TEntryArray& anArray,TRequestStatus& aStatus) const;
2506 EFSRV_IMPORT_C TInt Read(TEntry& anEntry) const;
2507 EFSRV_IMPORT_C void Read(TPckg<TEntry>& anEntry,TRequestStatus& aStatus) const;
2508
2509private:
2510 // RSubSessionBase overrides
2511 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
2512
2513 friend class RDirPlugin;
2514 };
2515
2516
2532public:
2533 IMPORT_C TInt Open(RFs& aFs,const TDesC& aName,TUint aFormatMode,TInt& aCount);
2534 IMPORT_C TInt Open(RFs& aFs,const TDesC& aName,TUint aFormatMode,TInt& aCount,const TDesC8& anInfo);
2535 IMPORT_C void Close();
2536 IMPORT_C TInt Next(TInt& aStep);
2537 IMPORT_C void Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus);
2555public:
2556 IMPORT_C TInt Open(RFs& aFs,TInt aDrive);
2557 IMPORT_C void Close();
2558 IMPORT_C TInt Read(TInt64 aPos,TDes8& aDes);
2559 IMPORT_C TInt Write(TInt64 aPos,TDesC8& aDes);
2560private:
2561 TInt iDrive;
2567class CDirStack;
2568NONSHARABLE_CLASS(CDirScan) : public CBase
2583 {
2584public:
2588 enum TScanDirection
2589 {
2594 EScanUpTree,
2595
2600 EScanDownTree
2601 };
2602public:
2603 IMPORT_C static CDirScan* NewL(RFs& aFs);
2604 IMPORT_C static CDirScan* NewLC(RFs& aFs);
2605 IMPORT_C ~CDirScan();
2606 IMPORT_C void SetScanDataL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortMask,TScanDirection aScanDir=EScanDownTree);
2607 IMPORT_C void NextL(CDir*& aDirEntries);
2608 IMPORT_C TPtrC AbbreviatedPath();
2609 IMPORT_C TPtrC FullPath();
2610protected:
2611 CDirScan(RFs& aFs);
2612private:
2613 inline RFs& Fs();
2614 void UpdateAbbreviatedPath();
2615 void ScanUpTreeL(CDir*& aDirEntries);
2616 void ScanDownTreeL(CDir*& aDirEntries);
2617 void GetDirEntriesL(CDir*& aDirEntries);
2618private:
2619 RFs* const iFs;
2620 TParse iFullPath;
2621 TPtrC iAbbreviatedPath;
2622 TInt iAbbreviatedPathPos;
2623 TUint iEntryAttMask;
2624 TUint iEntrySortMask;
2625 TBool iScanning;
2626 TScanDirection iScanDir;
2627 CDirStack* iStack;
2628 };
2629
2630
2631
2633enum TFileManError
2642 {
2649
2650
2659
2660
2670
2671
2677
2678
2684
2685
2692
2693
2694
2695
2696class MFileManObserver
2718 {
2719public:
2723 enum TControl
2724 {
2728 EContinue,
2729
2730
2734 ERetry,
2735
2736
2740 EAbort,
2741
2742
2746 ECancel
2747 };
2748public:
2749 IMPORT_C virtual TControl NotifyFileManStarted();
2750 IMPORT_C virtual TControl NotifyFileManOperation();
2751 IMPORT_C virtual TControl NotifyFileManEnded();
2752 };
2753
2754
2755
2756
2757class CFileBase : public CBase
2769 {
2770public:
2771 IMPORT_C void SetObserver(MFileManObserver* anObserver);
2772public:
2773 IMPORT_C const TEntry& CurrentEntry();
2774 IMPORT_C TPtrC AbbreviatedPath();
2775 IMPORT_C TPtrC FullPath();
2776 IMPORT_C TInt GetLastError();
2778protected:
2779 IMPORT_C CFileBase(RFs& anFs);
2780 IMPORT_C void ConstructL();
2781 IMPORT_C ~CFileBase();
2782 IMPORT_C void RunL();
2783 IMPORT_C void RunInSeparateThreadL(TThreadFunction aThreadFunction);
2784// virtual
2791 virtual void CompleteOperationL() {};
2792
2793//pure virtual
2800 virtual void DoOperationL() = 0;
2801protected:
2802 RFs iFs;
2806 CDirScan* iScanner;
2807 CDir* iDirList;
2808 TInt iCurrentEntry;
2809 TUint iMatchEntry;
2813 TInt iLastError;
2819
2820
2821
2822friend void DoFManBaseOperationL(TAny* aPtr);
2823friend TInt FManBaseThreadFunction(TAny* aPtr);
2824 };
2825
2826
2827
2828
2829NONSHARABLE_CLASS(CFileMan) : public CFileBase
2883 {
2884public:
2891 enum TAction
2892 {
2896 ENone,
2897
2898
2902 EAttribs,
2903
2908 ECopy,
2909
2914 EDelete,
2915
2916
2920 EMove,
2921
2926 ERename,
2927
2928
2932 ERmDir,
2938 ERenameInvalidEntry,
2943 ECopyFromHandle,
2954 enum TSwitch
2955 {
2961 EOverWrite=1,
2962
2963
2967 ERecurse=2
2968 };
2969public:
2970 IMPORT_C static CFileMan* NewL(RFs& aFs);
2971 IMPORT_C static CFileMan* NewL(RFs& aFs,MFileManObserver* anObserver);
2972 ~CFileMan();
2973 IMPORT_C TAction CurrentAction();
2974 IMPORT_C void GetCurrentTarget(TFileName& aFile);
2975 IMPORT_C void GetCurrentSource(TFileName& aFile);
2976 IMPORT_C TInt BytesTransferredByCopyStep();
2977public:
2978 IMPORT_C TInt Attribs(const TDesC& aName,TUint aSetMask,TUint aClearMask,const TTime& aTime,TUint aSwitch=0);
2979 IMPORT_C TInt Attribs(const TDesC& aName,TUint aSetMask,TUint aClearMask,const TTime& aTime,TUint aSwitch,TRequestStatus& aStatus);
2980 IMPORT_C TInt Copy(const TDesC& anOld,const TDesC& aNew,TUint aSwitch=EOverWrite);
2981 IMPORT_C TInt Copy(const TDesC& anOld,const TDesC& aNew,TUint aSwitch,TRequestStatus& aStatus);
2982 IMPORT_C TInt Delete(const TDesC& aName,TUint aSwitch=0);
2983 IMPORT_C TInt Delete(const TDesC& aName,TUint aSwitch,TRequestStatus& aStatus);
2984 IMPORT_C TInt Move(const TDesC& anOld,const TDesC& aNew,TUint aSwitch=EOverWrite);
2985 IMPORT_C TInt Move(const TDesC& anOld,const TDesC& aNew,TUint aSwitch,TRequestStatus& aStatus);
2986 IMPORT_C TInt Rename(const TDesC& anOld,const TDesC& aNew,TUint aSwitch=EOverWrite);
2987 IMPORT_C TInt Rename(const TDesC& anOld,const TDesC& aNew,TUint aSwitch,TRequestStatus& aStatus);
2988 IMPORT_C TInt RmDir(const TDesC& aDirName);
2989 IMPORT_C TInt RmDir(const TDesC& aDirName,TRequestStatus& aStatus);
2990 IMPORT_C TInt Copy(const RFile& anOld,const TDesC& aNew,TUint aSwitches=EOverWrite);
2991 IMPORT_C TInt Copy(const RFile& anOld,const TDesC& aNew,TUint aSwitches,TRequestStatus& aStatus);
2992protected:
2993 CFileMan(RFs& aFs);
2994private:
3003 enum TInternalAction
3004 {
3009 EInternalNone,
3010
3015 EInternalAttribs,
3016
3021 EInternalCopy,
3022
3027 EInternalDelete,
3028
3033 EInternalCopyForMove,
3034
3040 EInternalRenameForMove,
3041
3046 EInternalRename,
3047
3052 EInternalRmDir,
3053
3058 EInternalRenameInvalidEntry,
3059
3064 EInternalCopyFromHandle,
3065 };
3066
3067 void CompleteOperationL();
3068 void DoOperationL();
3069 void CheckForDirectory();
3070 void SetFlags(TBool aOverWrite,TBool aRecurse,TBool aScanDirection,TBool aMoveRename);
3071 void GetSrcAndTrg(TParse& aSrcName,TFileName& aTrgName);
3072 void DoSynchronize(TInt aRetVal);
3073 TInt CheckRenameAllowed(const TDesC& aSrcName,const TDesC& aTrgName);
3074 TInt SetupMoveOnSameDrive(TUint aSwitches, TBool& aComplete);
3075 TInt SetupMoveAcrossDrives(TUint aSwitches);
3076 TInt SetupTargetDirectory(TBool aOverWrite, TBool& aComplete);
3077 TBool SrcTrgDrivesIdentical();
3078 TInt SetupDirectoryForMove(TBool& aSrcIsDir);
3079private:
3080 void DoAttribsL();
3081 void DoCopyOrMoveL();
3082 void DoDeleteL();
3083 void DoRenameL();
3084 void DoRmDirL();
3085 void DoCopyFromHandleL();
3086#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
3087 TInt DoCopy(const RFile& aSrcFile, RFile& aDstFile, TInt& aRet);
3088#else
3089 TInt DoCopy(const RFile64& aSrcFile, RFile64& aDstFile, TInt& aRet);
3090#endif
3091private:
3092 TParse iTrgFile;
3093 TInternalAction iAction;
3094 TUint iSetMask;
3095 TUint iClearMask;
3096 TTime iTime;
3097 TInt iBytesTransferred;
3098#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
3099 RFile iSrcFileHandle;
3100#else
3101 RFile64 iSrcFileHandle;
3102#endif
3103 TBool iMovingContents;
3104 TEntry iTmpEntry;
3105 TParse iTmpParse;
3106 TFileName iTmpName1;
3107 TFileName iTmpName2;
3108
3109friend void RenameInvalidEntryL(RFs& aFs,TParse& aSrcFile);
3110 };
3111
3112
3113
3114
3115
3142class TFindFile
3143 {
3144public:
3145 IMPORT_C TFindFile(RFs& aFs);
3146 IMPORT_C TInt FindByPath(const TDesC& aFileName,const TDesC* aPathList);
3147 IMPORT_C TInt FindByDir(const TDesC& aFileName,const TDesC& aDirPath);
3148 IMPORT_C TInt Find();
3149 IMPORT_C TInt FindWildByPath(const TDesC& aFileName,const TDesC* aPathList,CDir*& aDirList);
3150 IMPORT_C TInt FindWildByDir(const TDesC& aFileName,const TDesC& aDirPath,CDir*& aDir);
3151 IMPORT_C TInt FindWild(CDir*& aDirList);
3152 IMPORT_C TInt SetFindMask(TUint aMask);
3153 inline const TDesC& File() const;
3154private:
3155 TInt DoFind();
3156 TInt DoFindByPath(const TDesC& aFileName,const TDesC* aPathList);
3157 TInt DoFindByDir(const TDesC& aFileName,const TDesC& aDir);
3158 TInt DoFindInDir();
3159 TInt DoFindNextInPath();
3160 TInt DoFindNextInDriveList();
3161 TInt CallSafe(TInt aResult);
3162private:
3163 RFs* const iFs;
3164 TParse iFile;
3165 TInt iPathPos;
3166 TInt iCurrentDrive;
3167 TInt iMode;
3168 const TDesC* iPath;
3169 TDriveList iDrvList;
3170 CDir** iDir;
3171 TUint32 iMatchMask;
3172 };
3173
3174
3175
3176
3186typedef CDir CFileList;
3187
3188
3189
3190
3191class TOpenFileScan
3204 {
3205public:
3206 IMPORT_C TOpenFileScan(RFs& aFs);
3207 IMPORT_C void NextL(CFileList*& aFileList);
3208 IMPORT_C TThreadId ThreadId() const;
3209private:
3210 RFs* iFs;
3211 TThreadId iThreadId;
3212 TInt iScanPos;
3213 TInt iEntryListPos;
3214 };
3215
3216
3217
3218
3219class TFileText
3226 {
3227private:
3228 enum TFileState
3229 {
3230 EStartOfFile,
3231 ENormal,
3232 EReverse
3233 };
3234public:
3235 IMPORT_C TFileText();
3236 IMPORT_C void Set(RFile& aFile);
3237 IMPORT_C TInt Read(TDes& aDes);
3238 IMPORT_C TInt Write(const TDesC& aDes);
3239 IMPORT_C TInt Seek(TSeek aMode);
3240private:
3241 void NextRecord();
3242 TInt CheckForTerminator(TBool& anAnswer);
3243 TInt FillBuffer();
3244private:
3245 const TText* iNext;
3246 const TText* iEnd;
3247 TFileState iState;
3248#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
3249 RFile iFile;
3250#else
3251 RFile64 iFile;
3252#endif
3253 TBuf8<0x100> iReadBuf;
3254 };
3255
3256
3257
3258//-------------------------------------------------------------------------------------------------------------------
3259/*
3260 This is a helper class intended to make it easier to dismount and re-mount a file system
3261 The purpose of this class is to gather and encapsulate all the necessary file system parameters such
3262 as the file system name, the extensions name(s), etc. ;
3263 these parameters are then retrieved & restored when mounting the file system back again
3264
3265 The typical scenario:
3266 1. some client dismounts an existing file system (FS1) from the drive
3267 2. then the client mounts another file system (FS2) on to the drive to do some work
3268 3. Dismounts FS2
3269 4. Mounts FS1 back again with exactly the same parameters as they were there before it was dismounted.
3270*/
3271class TFsMntHelperImpl;
3272NONSHARABLE_CLASS(CFsMountHelper) : public CBase
3273 {
3274 public:
3275
3276 IMPORT_C ~CFsMountHelper();
3277 IMPORT_C static CFsMountHelper* New(RFs& aFs, TInt aDrvNum);
3278
3280 enum TFsDismountMode
3282 ENormal,
3283 EForceImmediate,
3289 ENotifyClients
3290 };
3291
3292
3293 IMPORT_C TInt GetMountProperties();
3294 IMPORT_C TInt MountFileSystem() const;
3295 IMPORT_C void DismountFileSystem(TRequestStatus& aStat, TFsDismountMode aDismountMode=ENormal) const;
3296 IMPORT_C TInt DismountFileSystem() const;
3297
3298 protected:
3299 inline CFsMountHelper();
3300 CFsMountHelper(const CFsMountHelper&);
3301 CFsMountHelper& operator=(const CFsMountHelper&);
3302
3303 void Close();
3304
3305 private:
3306 TFsMntHelperImpl* ipImpl;
3307 };
3308
3309
3310
3311//-------------------------------------------------------------------------------------------------------------------
3312
3317IMPORT_C TBool FileNamesIdentical(const TDesC& aFileName1,const TDesC& aFileName2);
3318
3325const TInt KFileServerUidValue = 0x100039e3;
3326
3328#include <f32file.inl>
3329#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
3330#include <f32file64.inl>
3331#endif
3332
3333#ifdef SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
3334#include <f32notification.h>
3335#endif
3336
3337#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
3338#include <f32file_private.h>
3339#endif
3340
3341#endif
Array of variable length objects packed into a flat buffer.
Definition e32base.h:1103
Container Base Class.
Definition e32base.h:60
Array of directory entries that has been read into memory from the file system.
Definition f32file.h:1974
IMPORT_C TInt Count() const
Gets the number of entries in the array of directory entries.
IMPORT_C TInt Sort(TUint aEntrySortKey)
Sorts the array of directory entries.
CArrayPakFlat< TEntry > * iArray
Definition f32file.h:1987
IMPORT_C void Compress()
Compresses the directory.
IMPORT_C const TEntry & operator[](TInt anIndex) const
Gets an entry from the array of directory entries.
IMPORT_C void AddL(const TEntry &anEntry)
Adds the specified entry to the directory.
IMPORT_C CDir()
Default constructor.
IMPORT_C void ExtractL(TBool aRemove, CDir *&aDir)
Copies all directory entries from this directory array, and adds them to a new directory array.
virtual IMPORT_C ~CDir()
Destructor.
static IMPORT_C CDir * NewL()
Allocates and constructs a directory object.
Abstract base class for file management.
Definition f32file.h:2900
RSemaphore iSynchronizer
Definition f32file.h:2936
IMPORT_C TFileManError GetMoreInfoAboutError()
Gets additional information about the latest error returned during a CFileMan operation.
IMPORT_C void RunInSeparateThreadL(TThreadFunction aThreadFunction)
Creates a separate thread to run the command.
RThread iFManThread
Definition f32file.h:2935
TRequestStatus * iStatus
Definition f32file.h:2946
CDirScan * iScanner
Definition f32file.h:2937
TFileManError iErrorInfo
Definition f32file.h:2945
virtual void DoOperationL()=0
Called from RunL to perform the requested operation.
CDir * iDirList
Definition f32file.h:2938
IMPORT_C void RunL()
Executes a command.
TParse iSrcFile
Definition f32file.h:2942
IMPORT_C TPtrC FullPath()
Gets the full path of the file or directory currently being processed.
friend TInt FManBaseThreadFunction(TAny *aPtr)
IMPORT_C ~CFileBase()
Destructor.
TUint iMatchEntry
Definition f32file.h:2940
IMPORT_C const TEntry & CurrentEntry()
Gets the entry currently being processed.
HBufC * iSessionPath
Definition f32file.h:2947
IMPORT_C void ConstructL()
Second phase constructor.
RFs iFsOld
Definition f32file.h:2934
virtual void CompleteOperationL()
Called from RunL to perform tidy up after an operation.
Definition f32file.h:2922
friend void DoFManBaseOperationL(TAny *aPtr)
IMPORT_C void SetObserver(MFileManObserver *anObserver)
Sets the observer.
MFileManObserver * iObserver
Definition f32file.h:2943
IMPORT_C TInt GetLastError()
Gets the latest error code returned during a CFileMan operation.
TInt iLastError
Definition f32file.h:2944
TInt iNumberOfFilesProcessed
Definition f32file.h:2948
IMPORT_C TPtrC AbbreviatedPath()
Gets the abbreviated path of the file or directory currently being processed.
TUint iSwitches
Definition f32file.h:2941
TInt iCurrentEntry
Definition f32file.h:2939
Provides notification of the progress of synchronous or asynchronous file management operations.
Definition f32file.h:2847
TControl
Control for the current CFileMan operation.
Definition f32file.h:2853
@ EAbort
Abort operation, causes function to return KErrCancel.
Definition f32file.h:2869
@ ERetry
Retry processing the previous entry.
Definition f32file.h:2863
@ ECancel
Cancel processing the current entry.
Definition f32file.h:2875
@ EContinue
Proceed with the current or the next entry.
Definition f32file.h:2857
virtual IMPORT_C TControl NotifyFileManOperation()
Informs the observer that an operation, i.e.
virtual IMPORT_C TControl NotifyFileManEnded()
Informs the observer that an operation is complete.
virtual IMPORT_C TControl NotifyFileManStarted()
Inform the observer that an operation is about to start.
Reads the entries contained in a directory.
Definition f32file.h:2618
EFSRV_IMPORT_C TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
Opens a directory using the specified UID type to filter the directory entry types that will subseque...
friend class RDirPlugin
Definition f32file.h:2632
EFSRV_IMPORT_C TInt Read(TEntryArray &anArray) const
Reads all filtered directory entries into the specified array.
EFSRV_IMPORT_C void Close()
Closes the directory.
Creates and opens a file, and performs all operations on a single open file.
Definition f32file.h:2518
EFSRV_IMPORT_C void Close()
Closes the file.
friend class RFilePlugin
Definition f32file.h:2579
EFSRV_IMPORT_C void ReadCancel() const
Cancels all outstanding asynchronous read requests for this subsession.
EFSRV_IMPORT_C TInt Flush()
Commits data to the storage device and flushes internal buffers without closing the file.
EFSRV_IMPORT_C TInt BlockMap(SBlockMapInfo &aInfo, TInt64 &aStartPos, TInt64 aEndPos=-1, TInt aBlockMapusage=EBlockMapUsagePaging) const
Fetches the Block Map of a file.
TInt DuplicateHandle(TInt &aSubSessionHandle) const
EFSRV_IMPORT_C TInt Modified(TTime &aTime) const
Gets local date and time the file was last modified, in universal time.
EFSRV_IMPORT_C TInt TransferToServer(TIpcArgs &aIpcArgs, TInt aFsHandleIndex, TInt aFileHandleIndex) const
Transfers an already open file to a server.
EFSRV_IMPORT_C TInt Rename(const TDesC &aNewName)
Renames a file.
EFSRV_IMPORT_C TInt SetModified(const TTime &aTime)
Sets the date and time the file was last modified.
EFSRV_IMPORT_C TInt Name(TDes &aName) const
Gets the final part of a filename.
EFSRV_IMPORT_C TInt Set(const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask)
Sets the file s attributes, and the date and time it was last modified.
EFSRV_IMPORT_C TInt AdoptFromCreator(TInt aFsIndex, TInt aFileHandleIndex)
Allows a server to adopt an already open file from a client process.
EFSRV_IMPORT_C TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode)
Opens an existing file for reading or writing.
EFSRV_IMPORT_C TInt AdoptFromServer(TInt aFsHandle, TInt aFileHandle)
Allows a client to adopt an already open file from a server.
EFSRV_IMPORT_C TInt FullName(TDes &aName) const
Gets the full filename.
EFSRV_IMPORT_C TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const
Gets information about the drive on which this file resides.
void CloseSubSession(TInt aFunction)
EFSRV_IMPORT_C TInt Att(TUint &aAttValue) const
Gets the file's attributes.
EFSRV_IMPORT_C TInt Read(TDes8 &aDes) const
Reads from the file at the current position.
EFSRV_IMPORT_C TInt Lock(TInt aPos, TInt aLength) const
Locks a region within the file as defined by a range of bytes.
EFSRV_IMPORT_C TInt SetAtt(TUint aSetAttMask, TUint aClearAttMask)
Sets or clears file attributes using two bitmasks.
EFSRV_IMPORT_C TInt AdoptFromClient(const RMessage2 &aMsg, TInt aFsHandleIndex, TInt aFileHandleIndex)
Allows a server to adopt an already open file from a client.
TInt Clamp(RFileClamp &aHandle)
Instructs the File Server that the file is not to be modified on storage media.
EFSRV_IMPORT_C TInt TransferToProcess(RProcess &aProcess, TInt aFsHandleIndex, TInt aFileHandleIndex) const
Transfers an already open file to another process.
TInt SendReceive(TInt aFunction, const TIpcArgs &aArgs) const
Sends a message to the server and waits synchronously for a reply.
EFSRV_IMPORT_C TInt Size(TInt &aSize) const
Gets the current file size.
EFSRV_IMPORT_C TInt TransferToClient(const RMessage2 &aMsg, TInt aFileHandleIndex) const
Transfers an already open file from a server to a client.
TInt CreateSubSession(const RSessionBase &aSession, TInt aFunction, const TIpcArgs &aArgs)
Creates a new sub-session within an existing session.
EFSRV_IMPORT_C TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode)
Creates and opens a temporary file with a unique name for writing and reading.
EFSRV_IMPORT_C TInt Seek(TSeek aMode, TInt &aPos) const
Sets the the current file position.
EFSRV_IMPORT_C TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode)
Opens a file for writing, replacing the content of any existing file of the same name if it exists,...
EFSRV_IMPORT_C TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode)
Creates and opens a new file for writing.
EFSRV_IMPORT_C TInt Duplicate(const RFile &aFile, TOwnerType aType=EOwnerProcess)
Make a duplicate of the passed file handle in the same thread.
EFSRV_IMPORT_C TInt SetSize(TInt aSize)
Sets the file size.
EFSRV_IMPORT_C TInt Write(const TDesC8 &aDes)
Writes to the file at the current offset within the file.
EFSRV_IMPORT_C TInt UnLock(TInt aPos, TInt aLength) const
Unlocks a region within the file as defined by a range of bytes.
EFSRV_IMPORT_C TInt ChangeMode(TFileMode aNewMode)
Switches an open file's access mode between EFileShareExclusive and EFileShareReadersOnly.
EFSRV_IMPORT_C TInt Adopt(RFs &aFs, TInt aHandle)
Adopts an already open file.
Formats a device, one step at a time.
Definition f32file.h:2652
IMPORT_C void Close()
Closes the Format subsession.
IMPORT_C TInt Next(TInt &aStep)
Executes the next format step.
IMPORT_C TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount)
Opens a device for formatting.
This class is used to for returning meaningful error code values to users of RFs::IsValidName(const T...
Definition f32file.h:2234
TError ErrorCode() const
returns the error code.
TUint InvalidCharPos() const
if the error code returned by TNameValidParam::ErrorCode() is TError::ErrBadCharacter,...
friend class TFsIsValidName
Definition f32file.h:2251
TError
possible error codes
Definition f32file.h:2241
@ ErrNone
no error.
Definition f32file.h:2242
@ ErrBadCharacter
aName contains a bad character; and its position is in iInvalidCharPos.
Definition f32file.h:2243
@ ErrBadName
aName isn't a valid file or directory name.
Definition f32file.h:2244
@ ErrNameTooLong
aName length or aName + session path length (see iUseSessionPath) is longer than 256 characters.
Definition f32file.h:2245
void UseSessionPath(TBool aUseSessionPath)
Allows the user to set, whether he wants to use the session path for filling up missing parts of the ...
A handle to a file server session.
Definition f32file.h:2076
EFSRV_IMPORT_C TInt GetLongName(const TDesC &aShortName, TDes &aLongName) const
Gets the long filename associated with a short (8.3) filename.
EFSRV_IMPORT_C TInt SessionPath(TDes &aPath) const
Gets the session path.
EFSRV_IMPORT_C TInt ResourceCount() const
Gets the number of currently open resources.
EFSRV_IMPORT_C TUint8 * IsFileInRom(const TDesC &aFileName) const
Gets a pointer to the specified file, if it is in ROM.
static EFSRV_IMPORT_C TBool IsRomAddress(TAny *aAny)
Tests whether the specified address is in ROM.
TInt Unclamp(const RFileClamp &aHandle)
Makes available for paging-out the media space occupied by the file identified by the supplied handle...
EFSRV_IMPORT_C TInt ExtensionName(TDes &aExtensionName, TInt aDrive, TInt aPos)
Gets the name of the extension on the specified drive at the specified position in the extension hier...
EFSRV_IMPORT_C TBool IsValidName(const TDesC &anEntryName) const
Tests whether a filename and path are syntactically correct.
EFSRV_IMPORT_C void ResourceCountMarkStart() const
Marks the start of resource count checking.
EFSRV_IMPORT_C TInt GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList) const
Gets a filtered list of a directory's contents.
EFSRV_IMPORT_C TBool GetNotifyUser()
Tests whether user notification of file read or write failure is in effect.
IMPORT_C TInt RemoveProxyDrive(const TDesC &aDriveName)
Removes the specified extension.
EFSRV_IMPORT_C TInt AddPlugin(const TDesC &aFileName) const
Loads a specified Plugin.
EFSRV_IMPORT_C TInt PluginName(TDes &aPluginName, TInt aDrive, TInt aPos)
Gets the name of the plugin on the specified drive at the specified position in the plugin hierarchy.
EFSRV_IMPORT_C TInt AddExtension(const TDesC &aFileName)
Loads the specified extension.
EFSRV_IMPORT_C TInt RemoveExtension(const TDesC &aExtensionName)
Removes the specified extension.
EFSRV_IMPORT_C TInt SetAtt(const TDesC &aName, TUint aSetAttMask, TUint aClearAttMask)
Sets or clears the attributes of a single file or directory.
EFSRV_IMPORT_C TInt GetDriveName(TInt aDrive, TDes &aDriveName) const
Gets the name of a drive.
EFSRV_IMPORT_C TInt SetSystemDrive(TDriveNumber aSystemDrive)
Set a specified drive as a "System Drive", see RFs::GetSystemDrive().
static EFSRV_IMPORT_C TBool IsValidDrive(TInt aDrive)
Tests whether the specified drive number is valid.
EFSRV_IMPORT_C void ResourceCountMarkEnd() const
Ends resource count checking.
EFSRV_IMPORT_C TInt Att(const TDesC &aName, TUint &aAttValue) const
Gets a file's attributes.
TFinaliseDrvMode
specifies drive finalisation modes
Definition f32file.h:2181
@ EFinal_RW
after successful finalisation the drive remains writable and will become "not finalised" after the fi...
Definition f32file.h:2182
@ EForceUnfinalise
Internal component API. mark the drive as "not finalised" can result in KErrAbort if the dive is in i...
Definition f32file.h:2184
@ EFinal_RO
after successful finalisation the drive becomes read-only
Definition f32file.h:2183
EFSRV_IMPORT_C TInt AddCompositeMount(const TDesC &aFileSystemName, TInt aLocalDriveToMount, TInt aCompositeDrive, TBool aSync) const
Adds a local drive to the composite filesystem.
EFSRV_IMPORT_C TInt Entry(const TDesC &aName, TEntry &anEntry) const
Gets the entry details for a file or directory.
EFSRV_IMPORT_C TInt LockDrive(TInt aDrv, const TMediaPassword &aOld, const TMediaPassword &aNew, TBool aStr)
Sets the password for the media in the specified drive.
EFSRV_IMPORT_C TInt Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots)
Connects a client to the file server.
EFSRV_IMPORT_C TInt SwapFileSystem(const TDesC &aOldFileSystemName, const TDesC &aNewFileSystemName, TInt aDrive) const
Dismount aOldFileSystemName and mount aNewFileSystemName in an atomic operation.
EFSRV_IMPORT_C void NotifyDiskSpace(TInt64 aThreshold, TInt aDrive, TRequestStatus &aStat)
Requests notification when the free disk space on the specified drive crosses the specified threshold...
EFSRV_IMPORT_C TInt FinaliseDrives()
Makes the best effort to finalise all drives in the system.
EFSRV_IMPORT_C TInt RmDir(const TDesC &aPath)
Removes a directory.
EFSRV_IMPORT_C TInt MountPlugin(const TDesC &aPluginName) const
Mounts a specified plugin.
EFSRV_IMPORT_C void StartupInitComplete(TRequestStatus &aStat)
Noifies the file server that startup initialisation is complete.
EFSRV_IMPORT_C TInt SetNotifyChange(TBool aNotifyChange)
Enables/Disables change notification on a per-session basis.
EFSRV_IMPORT_C void NotifyDiskSpaceCancel()
Cancels all outstanding requests for free disk space notification.
TInt MountProxyDrive(const TUint aDrive, const TDesC &aName, T0 a0, T1 a1)
Definition f32file.h:2221
EFSRV_IMPORT_C TInt ReserveDriveSpace(TInt aDriveNo, TInt aSpace)
Reserves an area of a drive.
EFSRV_IMPORT_C TInt Delete(const TDesC &aName)
Deletes a single file.
EFSRV_IMPORT_C TInt CreatePrivatePath(TInt aDrive)
Creates the private path for a process on the specified drive.
static EFSRV_IMPORT_C TDriveNumber GetSystemDrive()
Obtain the system drive number.
EFSRV_IMPORT_C TInt SetSubst(const TDesC &aPath, TInt aDrive=KDefaultDrive)
Assigns a path to a drive letter.
IMPORT_C TInt SetErrorCondition(TInt anError, TInt aCount=0)
Sets the failure condition.
EFSRV_IMPORT_C TInt ReleaseReserveAccess(TInt aDriveNo)
Release exclusive access for this session to overwrite a specific disk area.
EFSRV_IMPORT_C void NotifyChangeCancel()
Cancels all outstanding requests for notification of change to files or directories.
EFSRV_IMPORT_C TInt Drive(TDriveInfo &anInfo, TInt aDrive=KDefaultDrive) const
Gets information about a drive and the medium mounted on it.
EFSRV_IMPORT_C TInt GetShortName(const TDesC &aLongName, TDes &aShortName) const
Gets the short filename associated with a VFAT long filename.
EFSRV_IMPORT_C TInt RemoveFileSystem(const TDesC &aFileSystemName) const
Removes the specified file system.
EFSRV_IMPORT_C TInt RealName(const TDesC &aName, TDes &aResult) const
Gets the real name of a file.
EFSRV_IMPORT_C TInt Rename(const TDesC &anOldName, const TDesC &aNewName)
Renames a single file or directory.
EFSRV_IMPORT_C TInt InitialisePropertiesFile(const TPtrC8 &aPtr) const
Sets the F32 properties file - Can only be called from the ESTART process.
EFSRV_IMPORT_C TInt SetVolumeLabel(const TDesC &aName, TInt aDrive=KDefaultDrive)
Sets the label for a volume.
EFSRV_IMPORT_C TInt GetReserveAccess(TInt aDriveNo)
Get exclusive access for this session to overwrite a specific disk area, which has previously been re...
EFSRV_IMPORT_C TInt FileSystemName(TDes &aName, TInt aDrive) const
Gets the name of the file system mounted on the specified drive.
IMPORT_C TInt DismountProxyDrive(const TUint aDrive)
Dismounts a proxy drive.
EFSRV_IMPORT_C TInt PrivatePath(TDes &aPath)
Creates the text defining the private path for a process.
EFSRV_IMPORT_C TInt AddFileSystem(const TDesC &aFileName) const
Adds a file system to the file server.
EFSRV_IMPORT_C TInt SetDebugRegister(TInt aVal)
Sets the debug register to the given value.
EFSRV_IMPORT_C TInt Replace(const TDesC &anOldName, const TDesC &aNewName)
Replaces a single file with another.
EFSRV_IMPORT_C TInt ErasePassword(TInt aDrv)
Erase the password from the locked MultiMedia card in the specified drive.
EFSRV_IMPORT_C TInt MkDir(const TDesC &aPath)
Makes a directory.
EFSRV_IMPORT_C TInt AllowDismount(TInt aDrive) const
Used by a client to indicate that it is safe to dismount the file system.
EFSRV_IMPORT_C TInt SetLocalDriveMapping(const TDesC8 &aMapping)
EFSRV_IMPORT_C TInt GetMediaSerialNumber(TMediaSerialNumber &aSerialNum, TInt aDrive)
Gets the serial number of media.
static EFSRV_IMPORT_C TChar GetSystemDriveChar()
This is a wrapper around GetSystemDrive() function.
EFSRV_IMPORT_C TInt UnlockDrive(TInt aDrv, const TMediaPassword &Pswd, TBool aStr)
Unlocks the media in the specified drive.
EFSRV_IMPORT_C void NotifyDismount(TInt aDrive, TRequestStatus &aStat, TNotifyDismountMode aMode=EFsDismountRegisterClient) const
Controls file system dismounting on the specified drive, the way of control depends on the parameter ...
EFSRV_IMPORT_C TInt SetSessionPath(const TDesC &aPath)
Sets the session path for the current file server client.
EFSRV_IMPORT_C TInt Modified(const TDesC &aName, TTime &aTime) const
Gets the last modification date and time of a file or a directory, in UTC.
EFSRV_IMPORT_C TInt FileSystemSubType(TInt aDriveNo, TDes &aName) const
This function queries the sub type of the file system mounted on the specified volume.
EFSRV_IMPORT_C TInt MkDirAll(const TDesC &aPath)
Makes one or more directories.
EFSRV_IMPORT_C TInt RemountDrive(TInt aDrive, const TDesC8 *aMountInfo=NULL, TUint aFlags=0)
Forces a remount of the specified drive.
EFSRV_IMPORT_C TInt LoaderHeapFunction(TInt aFunction, TAny *aArg1=NULL, TAny *aArg2=NULL)
This member function is not implemented in this version of Symbian OS.
EFSRV_IMPORT_C TInt MountFileSystem(const TDesC &aFileSystemName, TInt aDrive) const
Mounts a file system on a drive.
static EFSRV_IMPORT_C TInt CharToDrive(TChar aChar, TInt &aDrive)
Maps a drive character to a drive number.
EFSRV_IMPORT_C void Close()
EFSRV_IMPORT_C TInt DriveList(TDriveList &aList) const
Gets a list of the available (not remote and non hidden) drives.
EFSRV_IMPORT_C TInt DismountPlugin(const TDesC &aPluginName) const
Dismounts the specified plugin from all drives on which it is mounted.
EFSRV_IMPORT_C void SetNotifyUser(TBool aValue)
Sets whether the user should be notified of file read or write failure.
EFSRV_IMPORT_C TInt IsFileOpen(const TDesC &aFile, TBool &anAnswer) const
Tests whether a file is open.
EFSRV_IMPORT_C TInt SupportedFileSystemName(TDes &aName, TInt aDrive, TInt aFsEnumerator) const
Get one of the supported file system names on a specified drive.
EFSRV_IMPORT_C TInt DismountExtension(const TDesC &aExtensionName, TInt aDrive)
Dismounts the specified extension.
EFSRV_IMPORT_C TInt MountFileSystemAndScan(const TDesC &aFileSystemName, TInt aDrive, TBool &aIsMountSuccess) const
Mounts a file system on a drive, and performs a scan on that drive.
friend class RFsPlugin
Definition f32file.h:2308
TInt SendReceive(TInt aFunction, const TIpcArgs &aArgs) const
Issues a synchronous request to the server with the specified function number and arguments.
EFSRV_IMPORT_C TInt VolumeIOParam(TInt aDriveNo, TVolumeIOParamInfo &aParamInfo) const
This function queries a set of I/O parameters on the specified volume, this includes the block size o...
EFSRV_IMPORT_C void NotifyChange(TNotifyType aType, TRequestStatus &aStat)
Requests a notification of change to files or directories.
EFSRV_IMPORT_C TInt SetModified(const TDesC &aName, const TTime &aTime)
Sets the date and time that the contents of a file or directory were modified, in UTC.
EFSRV_IMPORT_C TInt ClearPassword(TInt aDrv, const TMediaPassword &aPswd)
Clears the password from the locked MultiMedia card in the specified drive.
IMPORT_C TInt AddProxyDrive(const TDesC &aFileName)
Loads the specified extension.
EFSRV_IMPORT_C TInt SetSessionToPrivate(TInt aDrive)
Sets the session path to point to the private path on the specified drive.
EFSRV_IMPORT_C TInt CheckDisk(const TDesC &aDrive) const
Checks the integrity of the File System mounted on the specified drive.
EFSRV_IMPORT_C TInt Volume(TVolumeInfo &aVol, TInt aDrive=KDefaultDrive) const
Gets volume information for a formatted device.
TForceMediaChangeFlags
A set of special flags passed directly to the media driver via RFs::RemountDrive() API.
Definition f32file.h:2276
@ KMediaRemountForceMediaChange
This flag is used to simulate ejecting and re-inserting the media.
Definition f32file.h:2287
@ KForceMediaChangeReOpenMediaDriver
This flag is used to force the media driver for the specified logical drive to be closed and reopened...
Definition f32file.h:2292
@ KForceMediaChangeReOpenAllMediaDrivers
Passing this flag to RFs::RemountDrive() API results in all media drivers associated with the primary...
Definition f32file.h:2281
EFSRV_IMPORT_C TInt SetAllocFailure(TInt aAllocNum)
Fails an allocation after aAllocNum successes.
EFSRV_IMPORT_C void NotifyDismountCancel() const
Cancels all oustanding dismount notifiers for this session, completing with KErrCancel.
EFSRV_IMPORT_C TVersion Version() const
Gets the client side version number.
EFSRV_IMPORT_C TInt FinaliseDrive(TInt aDriveNo, TFinaliseDrvMode aMode) const
Finalise the given drive.
EFSRV_IMPORT_C void DebugNotify(TInt aDrive, TUint aNotifyType, TRequestStatus &aStat)
Request notification of a file server event - file system specific.
EFSRV_IMPORT_C TInt QueryVolumeInfoExt(TInt aDrive, TQueryVolumeInfoExtCmd aCommand, TDes8 &aInfo) const
Queries specific information on volumes by commands.
EFSRV_IMPORT_C TInt SetDriveName(TInt aDrive, const TDesC &aDriveName)
Sets the name of a drive.
EFSRV_IMPORT_C TInt SetEntry(const TDesC &aName, const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask)
Sets both the attributes and the last modified date and time for a file or directory.
EFSRV_IMPORT_C TInt ScanDrive(const TDesC &aDrive) const
Checks the integrity of the File System mounted on the specified drive and attempts to correct some k...
EFSRV_IMPORT_C TInt Subst(TDes &aPath, TInt aDrive=KDefaultDrive) const
Gets the path assigned to a drive letter by an earlier call to SetSubst().
static EFSRV_IMPORT_C TInt DriveToChar(TInt aDrive, TChar &aChar)
Maps a drive number to the corresponding character.
EFSRV_IMPORT_C TInt ControlIo(TInt aDrive, TInt aCommand)
General purpose test interface - file system specific.
EFSRV_IMPORT_C TInt RemovePlugin(const TDesC &aPluginName) const
Removes the specified plugin.
EFSRV_IMPORT_C TInt MountExtension(const TDesC &aExtensionName, TInt aDrive)
Mounts the the specified extension.
EFSRV_IMPORT_C TInt Parse(const TDesC &aName, TParse &aParse) const
Parses a filename specification.
@ KRootFileSystem
specifies "root" file system. The result will be the same as for FileSystemName() API call
Definition f32file.h:2262
@ KFirstChildFileSystem
specifies the first child file system number, the second will be KFirstChildFileSystem+1 etc.
Definition f32file.h:2263
EFSRV_IMPORT_C TInt SetStartupConfiguration(TInt aCommand, TAny *aParam1, TAny *aParam2) const
Only can be called in estart.
EFSRV_IMPORT_C TInt ReadFileSection(const TDesC &aName, TInt64 aPos, TDes8 &aDes, TInt aLength) const
Reads data from a file without opening it.
EFSRV_IMPORT_C TInt DismountFileSystem(const TDesC &aFileSystemName, TInt aDrive) const
Dismounts the file system from the specified drive.
An object that encapsulates the details of a client request.
Definition e32cmn.h:3465
A handle to a process.
Definition e32std.h:4335
Enables direct disk access.
Definition f32file.h:2677
IMPORT_C TInt Open(RFs &aFs, TInt aDrive)
Opens a direct access channel to the disk.
IMPORT_C TInt Write(TInt64 aPos, TDesC8 &aDes)
Writes directly to the disk.
IMPORT_C void Close()
Closes the direct access channel to the disk, and allows other resources to access the disk.
IMPORT_C TInt Read(TInt64 aPos, TDes8 &aDes)
Reads directly from the disk.
A handle to a semaphore.
Definition e32cmn.h:2636
Client-side handle to a session with a server.
Definition e32std.h:4611
Client-side handle to a sub-session.
Definition e32std.h:4727
A handle to a thread.
Definition e32std.h:4091
IMPORT_C void SetNumberOfBlocks(TUint aNumberOfBlocks)
IMPORT_C TBlockMapEntry()
IMPORT_C void SetStartBlock(TUint aStartBlock)
A build-independent non-modifiable buffer descriptor.
Definition e32cmn.h:1523
A build-independent modifiable buffer descriptor.
Definition e32cmn.h:1578
Holds a character value and provides a number of utility functions to manipulate it and test its prop...
Definition e32cmn.h:480
Contains drive information.
Definition f32file.h:1607
TBatteryState iBattery
Indicates whether the drive supports a battery, and if so, its state.
Definition f32file.h:1618
TConnectionBusType iConnectionBusType
The type of interface used to connect to the media.
Definition f32file.h:1651
TMediaType iType
The type of media mounted on the drive.
Definition f32file.h:1612
TUint iMediaAtt
The attributes of the media mounted on the drive.
Definition f32file.h:1645
TUint iDriveAtt
The drive attributes.
Definition f32file.h:1632
Drive numbers and letters.
Definition f32file.h:1769
IMPORT_C TDriveName Name() const
Gets the drive unit as text.
IMPORT_C TDriveUnit & operator=(TInt aDrive)
Assigns the drive number to the drive unit.
Array of directory entries.
Definition f32file.h:1578
IMPORT_C TInt Count() const
Gets the number of entries in the array.
friend class TRawEntryArray
Definition f32file.h:1590
IMPORT_C const TEntry & operator[](TInt anIndex) const
Gets the directory entry at the specified index.
IMPORT_C TEntryArray()
Default constructor.
Encapsulates an entry in a directory, which can be another (nested) directory, a file or a volume lab...
Definition f32file.h:1489
TBool IsUidPresent(TUid aUid) const
Tests whether the specified UID matches any of the UIDs in the UID type.
TUidType iType
The file's UIDtype.
Definition f32file.h:1539
TUid MostDerivedUid() const
Gets the most derived (i.e.
IMPORT_C TInt64 FileSize() const
IMPORT_C TBool IsArchive() const
Tests whether the file is an archive file.
TBufC< KMaxFileName > iName
The name of the file relative to the owning directory, with a maximum of KMaxFileName characters.
Definition f32file.h:1548
TTime iModified
The local time of last modification.
Definition f32file.h:1533
TBool IsTypeValid() const
Test whether the file has a valid UID.
IMPORT_C TBool IsReadOnly() const
Tests whether the file or directory is read-only.
IMPORT_C TBool IsSystem() const
Tests whether the file or directory has the system attribute set.
IMPORT_C TEntry()
Default constructor.
TInt iSize
The size of the file in bytes.
Definition f32file.h:1527
IMPORT_C TBool IsDir() const
Tests whether the entry is a directory.
IMPORT_C TBool IsHidden() const
Tests whether the file or directory is hidden.
void SetFileSize(TInt64 aFileSize)
Sets 64 bit file size.
IMPORT_C TEntry & operator=(const TEntry &aEntry)
Assignment operator.
TUint iAtt
The individual bits within this byte indicate which attributes have been set.
Definition f32file.h:1520
const TUid & operator[](TInt anIndex) const
Gets any one of the file's three UIDs.
Reads and writes single lines of text to or from a Unicode file.
Definition f32file.h:3366
IMPORT_C TFileText()
Default constructor.
IMPORT_C TInt Read(TDes &aDes)
Reads single line text record from a Unicode file into the specified descriptor.
IMPORT_C TInt Seek(TSeek aMode)
Seeks to start or end of file.
IMPORT_C TInt Write(const TDesC &aDes)
Writes the contents of a descriptor to the end of a Unicode file.
IMPORT_C void Set(RFile &aFile)
Sets the Unicode file to be read from, or written to.
Searches for files and directories.
Definition f32file.h:3277
IMPORT_C TInt Find()
Searches for the next file/directory.
IMPORT_C TInt SetFindMask(TUint aMask)
Can be used in order to specify a combination of drive attributes that the drives to be searched must...
IMPORT_C TInt FindWild(CDir *&aDirList)
Searches for the next file/directory.
IMPORT_C TInt FindWildByPath(const TDesC &aFileName, const TDesC *aPathList, CDir *&aDirList)
Searches for one or more files/directories in the directories contained in a path list.
IMPORT_C TInt FindByPath(const TDesC &aFileName, const TDesC *aPathList)
Searches for a file/directory in one or more directories in the path.
IMPORT_C TInt FindWildByDir(const TDesC &aFileName, const TDesC &aDirPath, CDir *&aDir)
Searches, using wildcards, for one or more files/directories in a specified directory.
const TDesC & File() const
Gets the full file specification of a file which was found by a successful call to any of the search ...
IMPORT_C TInt FindByDir(const TDesC &aFileName, const TDesC &aDirPath)
Searches for a file/directory in a directory on all available drives.
A Version 2 client/server class that clients use to package the arguments to be sent to a server.
Definition e32cmn.h:6817
Provides general string-parsing functions suitable for numeric format conversions and syntactical-ele...
Definition e32std.h:1196
Scans open files to get a list of the entries for all files which are currently open in a particular ...
Definition f32file.h:3342
IMPORT_C TThreadId ThreadId() const
Gets the ID of the thread that opened the files retrieved by NextL().
IMPORT_C void NextL(CFileList *&aFileList)
Gets a list of entries for the open files in the file server session.
Base class for file name parsing.
Definition f32file.h:1816
IMPORT_C TPtrC DriveAndPath() const
Gets the drive letter and path.
IMPORT_C TPtrC Ext() const
Gets the extension.
IMPORT_C TBool NamePresent() const
Tests whether a file name is present.
IMPORT_C TBool DrivePresent() const
Tests whether a drive is present.
TInt16 iMod
Definition f32file.h:1853
IMPORT_C TPtrC Drive() const
Gets the drive letter.
IMPORT_C TInt PopDir()
Removes the last directory from the path in the fully parsed specification.
IMPORT_C TBool PathPresent() const
Tests whether a path is present.
IMPORT_C TInt AddDir(const TDesC &aName)
Adds a single directory onto the end of the path in the fully parsed specification.
IMPORT_C TPtrC Path() const
Gets the path.
IMPORT_C const TDesC & FullName() const
Gets the complete file specification.
IMPORT_C TBool ExtPresent() const
Tests whether an extension is present.
IMPORT_C TBool NameOrExtPresent() const
Tests whether a filename or an extension are present.
IMPORT_C TPtrC Name() const
Gets the filename.
virtual TDes & NameBuf()=0
IMPORT_C TBool IsKMatchAny() const
Tests whether the name or the extension contains asterisk wildcards.
IMPORT_C TBool IsRoot() const
Tests whether the path in the fully parsed specification is the root directory.
IMPORT_C TParseBase()
Default constructor.
TInt Set(const TDesC *aName, const TDesC *aRelated, const TDesC *aDefault, TBool allowWild)
virtual const TDesC & NameBufC() const =0
IMPORT_C TBool IsNameWild() const
Tests whether the filename in the fully parsed specification contains one or more wildcard characters...
IMPORT_C TBool IsWild() const
Tests whether the filename or the extension in the fully parsed specification contains one or more wi...
IMPORT_C TBool IsExtWild() const
Tests whether the extension in the fully parsed specification contains one or more wildcard character...
IMPORT_C TPtrC NameAndExt() const
Gets the filename and extension.
IMPORT_C TBool IsKMatchOne() const
Tests whether the name or the extension contains a question mark wildcard.
Parses, but cannot modify, filenames using less space on the stack than TParse.
Definition f32file.h:1916
IMPORT_C const TDesC & NameBufC() const
Gets a const reference to the descriptor containing the filename passed to the constructor of this ob...
IMPORT_C TDes & NameBuf()
Gets a reference to the descriptor containing the filename passed to the constructor of this object.
Parses filenames using less space on the stack than TParse.
Definition f32file.h:1882
IMPORT_C TDes & NameBuf()
Gets a reference to the descriptor containing the filename passed to the constructor of this object.
IMPORT_C const TDesC & NameBufC() const
Gets a const reference to the descriptor containing the filename passed to the constructor of this ob...
Parses filenames.
Definition f32file.h:1948
IMPORT_C const TDesC & NameBufC() const
Gets a const reference to the descriptor containing the file specification passed to the constructor ...
IMPORT_C TInt SetNoWild(const TDesC &aName, const TDesC *aRelated, const TDesC *aDefault)
Parses a file specification; disallows wildcards in any part of the file name or extension.
IMPORT_C TDes & NameBuf()
Gets a reference to the descriptor containing the file specification passed to the constructor of thi...
IMPORT_C TParse()
Default constructor.
IMPORT_C TInt Set(const TDesC &aName, const TDesC *aRelated, const TDesC *aDefault)
Parses a file specification, allowing wildcards in the filename and extension.
Packages an object into a modifiable buffer descriptor.
Definition e32cmn.h:1807
Packages a modifiable pointer descriptor which represents an object of specific type.
Definition e32cmn.h:1778
Indicates the completion status of a request made to a service provider.
Definition e32cmn.h:2243
Encapsulates the Id of a thread.
Definition e32std.h:3955
Stores and manipulates the date and time.
Definition e32std.h:1889
Encapsulates a set of three unique identifiers (UIDs) which, in combination, identify a system object...
Definition e32cmn.h:1991
A globally unique 32-bit number.
Definition e32cmn.h:1959
Contains version information.
Definition e32cmn.h:2200
Base class for volume formatting parameters.
Definition f32file.h:2332
static TUint32 CalcFSNameHash(const TDesC &aFsName)
Calculates the file system name hash.
TUint32 FSNameHash() const
TUint32 GetVal(TUint aIndex) const
const TUint32 iUId
This class tree UID.
Definition f32file.h:2361
void SetFileSystemName(const TDesC &aFsName)
sets the file system name hash corresponding to aFsName
TBool SomeParamsSet() const
void SetVal(TUint aIndex, TUint32 aVal)
assign a data slot some integer value.
void Init()
resets all data to the "not set" values
Volume IO parameter information.
Definition f32file.h:804
TInt iBlockSize
The size of a media block in bytes.
Definition f32file.h:814
TInt iRecReadBufSize
The recommended buffer size for optimised reading performance.
Definition f32file.h:843
TInt iRecWriteBufSize
The recommended buffer size for optimised writing performance.
Definition f32file.h:858
TUint64 iMaxSupportedFileSize
The maximum file size that is supported by the file system mounted on this volume.
Definition f32file.h:866
TInt iClusterSize
The size in bytes of a single file system cluster.
Definition f32file.h:826
Contains information about a volume mounted on a drive.
Definition f32file.h:1678
IMPORT_C TVolumeInfo()
Default constructor.
TDriveInfo iDrive
Information about the drive on which the volume is mounted.
Definition f32file.h:1687
TBufC< KMaxFileName > iName
Name of the volume, with a maximum of KMaxFileName characters.
Definition f32file.h:1716
TUint8 iVolSizeAsync
Definition f32file.h:1738
TFileCacheFlags iFileCacheFlags
Flags which define the default file-caching behaviour for this volume.
Definition f32file.h:1723
TUint iUniqueID
The volume’s unique identifying number.
Definition f32file.h:1693
TInt64 iFree
The amount of free space on the volume in bytes.
Definition f32file.h:1706
TInt64 iSize
The maximum size of the volume in bytes.
Definition f32file.h:1700
HBufC8 HBufC
Defines a build-independent heap descriptor.
Definition e32cmn.h:1431
TPtr8 TPtr
Defines a build-independent modifiable pointer descriptor.
Definition e32cmn.h:1408
TBuf8< KMaxSerialNumLength > TMediaSerialNumber
Definition e32cmn.h:5219
TDes8 TDes
Defines a build-independent modifiable descriptor.
Definition e32cmn.h:1387
TPtrC8 TPtrC
Defines a build-independent non-modifiable pointer descriptor.
Definition e32cmn.h:1366
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
Definition e32cmn.h:1345
TBuf8< KMaxMediaPassword > TMediaPassword
Defines an 8-bit modifiable buffer descriptor to contain passwords when dealing with password securit...
Definition e32cmn.h:3544
const TUint KEntryAttReadOnly
File/directory attribute: read-only file or directory.
Definition f32file.h:292
TFileManError
A list of CFileMan error codes.
Definition f32file.h:2769
@ ENoExtraInformation
No additional error information is available, either because the latest CFileMan operation did not re...
Definition f32file.h:2775
@ ESrcOpenFailed
Error occurred when attempting to open the source file for a file copy or move.
Definition f32file.h:2803
@ EScanNextDirectoryFailed
A leave occurred while scanning the next directory in the course of a file management function.
Definition f32file.h:2796
@ EInitializationFailed
A leave occurred while setting up the initial scan.
Definition f32file.h:2785
@ ENoFilesProcessed
The operation completed without processing any files because no matching files were found.
Definition f32file.h:2817
@ ETrgOpenFailed
Error occurred while attempting to create, or, if overwriting is in effect, replace the target file f...
Definition f32file.h:2810
const TUint KEntryAttMatchExclusive
Bit mask for matching file and directory entries.
Definition f32file.h:511
const TInt KExtDelimiter
The character used to separate the filename from the extension.
Definition f32file.h:163
TNotifyDismountMode
Notification modes for safe media removal notification API.
Definition f32file.h:683
@ EFsDismountForceDismount
Used to forcibly dismount the file system without notifying clients.
Definition f32file.h:694
@ EFsDismountRegisterClient
Used by a client to register for notification of pending dismount.
Definition f32file.h:685
@ EFsDismountNotifyClients
Used for graceful file system dismounting with notifying clients of a pending dismount.
Definition f32file.h:691
const TUint KEntryAttSystem
File/directory attribute: system file.
Definition f32file.h:318
TBuf8< KMaxDrives > TDriveList
Defines a modifiable buffer descriptor to contain a drive list.
Definition f32file.h:204
const TUint KEntryAttMatchExclude
Bit mask for matching file and directory entries.
Definition f32file.h:558
const TUint KEntryAttMatchMask
Bit mask for matching file and directory entries.
Definition f32file.h:470
TBuf< KMaxDriveName > TDriveName
Defines a modifiable buffer descriptor to contain a drive name.
Definition f32file.h:237
TQueryVolumeInfoExtCmd
Commands to query specific volume information.
Definition f32file.h:750
@ EIOParamInfo
Queries the I/O parameters of a specificed volume.
Definition f32file.h:761
@ EIsDriveSync
This command determines whether the volume is synchronous or asynchronous.
Definition f32file.h:768
@ EFSysExtensionsSupported
Query the volume to ascertain whether File system extensions are supported on this volume.
Definition f32file.h:785
@ EIsDriveFinalised
Query if the given drive is finalised.
Definition f32file.h:776
@ EFileSystemSubType
Queries the sub type of the file system mounted on a specified volume.
Definition f32file.h:755
const TInt KMaxProxyDrives
The maximum number of available proxy drives.
Definition f32file.h:187
const TInt KMaxDriveName
The maximum length of a drivename.
Definition f32file.h:218
const TUint KEntryAttPacked
Indicates that a TEntry (that is generally returned from a TEntryArray) is stored in packed format wh...
Definition f32file.h:592
const TUint KEntryAttArchive
File/directory attribute: an archive file.
Definition f32file.h:357
TBlockMapUsage
Definition f32file.h:1454
@ ETestDebug
Definition f32file.h:1458
@ EBlockMapUsagePaging
Definition f32file.h:1456
const TUint KEntryAttNormal
File/directory attribute: any file without the hidden or system attribute.
Definition f32file.h:279
TBuf< KMaxFSNameLength > TFSName
Defines a modifiable buffer descriptor to contain a file system or file system sub type name.
Definition f32file.h:266
TFileMode
Access and share modes available when opening a file.
Definition f32file.h:1134
@ EFileBigFile
Definition f32file.h:1254
@ EFileWriteDirectIO
Disables write buffering.
Definition f32file.h:1221
@ EFileStream
For files to be opened in binary mode.
Definition f32file.h:1182
@ EFileReadAheadOn
Enables read ahead.
Definition f32file.h:1236
@ EFileRead
The file may be read from but not written to.
Definition f32file.h:1194
@ EFileShareReadersOrWriters
Shared access for reading and writing.
Definition f32file.h:1176
@ EFileReadBuffered
Enables read buffering.
Definition f32file.h:1226
@ EFileShareAny
Shared access for reading and writing.
Definition f32file.h:1164
@ EFileReadDirectIO
Disables read buffering.
Definition f32file.h:1231
@ EFileStreamText
For files to be opened in text mode.
Definition f32file.h:1188
@ EFileShareExclusive
Exclusive access for the program opening the file.
Definition f32file.h:1142
@ EFileSequential
Using this flag implies that the client is making large sequential reads and/or writes and it is inte...
Definition f32file.h:1279
@ EFileReadAsyncAll
Specifies that an asynchronous read request should not be completed until all requested data becomes ...
Definition f32file.h:1211
@ EFileWrite
The file may be read from and written to.
Definition f32file.h:1202
@ EFileWriteBuffered
Enables write buffering.
Definition f32file.h:1216
@ EDeleteOnClose
Enable delete on close.
Definition f32file.h:1246
@ EFileReadAheadOff
Disables read ahead.
Definition f32file.h:1241
@ EFileShareReadersOnly
Read-only sharing.
Definition f32file.h:1152
const TInt KEntryArraySize
The size of the array of TEntry items contained in a TEntryArray object.
Definition f32file.h:124
const TInt KFileServerDefaultMessageSlots
The default value for the number of message slots passed to RFs::Connect().
Definition f32file.h:108
const TUint KEntryAttDir
File/directory attribute: a directory without the hidden or system attribute.
Definition f32file.h:344
const TUint KEntryAttXIP
File/directory attribute: ROM eXecute In Place file.
Definition f32file.h:370
TFormatMode
The format method.
Definition f32file.h:1310
@ EFullFormat
Performs a full format, erasing whole media content and creating new file system layout.
Definition f32file.h:1339
@ ESpecialFormat
Indicates a custom formatting mode.
Definition f32file.h:1357
@ EQuickFormat
Performs a quick media format, erasing only required minimum media content.
Definition f32file.h:1347
@ EHighDensity
Indicates a high density floppy disk to be formatted.
Definition f32file.h:1319
@ EForceErase
Forced erase of locked media.
Definition f32file.h:1362
@ ELowDensity
Indicates a low density floppy disk to be formatted.
Definition f32file.h:1330
@ EForceFormat
This flag enables formatting the volume even if it has files or directories opened on it.
Definition f32file.h:1372
const TUint KEntryAttUnique
Bit mask for feature manager file entries.
Definition f32file.h:527
const TUint KEntryAttAllowUid
Bit mask for matching file and directory entries.
Definition f32file.h:576
const TUint KMaxMapsPerCall
Definition f32file.h:601
const TInt KFileServerUidValue
The UID of the File Server process.
Definition f32file.h:3469
NONSHARABLE_CLASS(CDirScan)
Scans a directory structure.
Definition f32file.h:2691
CDir CFileList
Contains a list of entries for the files which were opened in a file server session.
Definition f32file.h:3322
const TUint KEntryAttMaskSupported
Bit mask for matching file and directory entries.
Definition f32file.h:489
const TInt KMaxFSNameLength
The maximum length of a file system name or file system sub type name.
Definition f32file.h:251
const TInt KDriveDelimiter
The character used to separate the drive letter from the path.
Definition f32file.h:150
const TUint KEntryAttHidden
File/directory attribute: hidden file or directory.
Definition f32file.h:305
const TInt KDefaultDrive
The session default drive.
Definition f32file.h:78
#define EFSRV_IMPORT_C
Definition f32file.h:1998
const TUint KEntryAttVolume
File/directory attribute: volume name directory.
Definition f32file.h:331
const TUint KEntryAttRemote
This file attribute bit is set if the file exists only on a remote file system and is not locally cac...
Definition f32file.h:391
TEntryKey
Flags indicating the order in which directory entries are to be sorted.
Definition f32file.h:909
@ EDirDescending
Qualifies the sort order; directories are sorted in descending order, i.e.
Definition f32file.h:1017
@ ESortByDate
Sort according to files' last modified time and date.
Definition f32file.h:955
@ EDirsFirst
Qualifies the sort order; if set, directories come before files in sort order.
Definition f32file.h:983
@ ESortByUid
Sort according to file UID.
Definition f32file.h:964
@ ESortByExt
Sort according to alphabetic order of file extension.
Definition f32file.h:935
@ ESortByName
Sort according to alphabetic order of file and directory name.
Definition f32file.h:922
@ ESortBySize
Sort according to file size.
Definition f32file.h:944
@ EDirsAnyOrder
Qualifies the sort order; if set, directories are listed in the order in which they occur.
Definition f32file.h:975
@ EDescending
Qualifies the sort order; files are sorted in descending order, i.e.
Definition f32file.h:1008
@ ESortNone
The default; no sorting takes place.
Definition f32file.h:913
@ EAscending
Qualifies the sort order; files are sorted in ascending order, i.e.
Definition f32file.h:1000
@ EDirsLast
Qualifies the sort order; if set, files come before directories in sort order.
Definition f32file.h:991
const TInt KPathDelimiter
The character used to separate directories in the path name.
Definition f32file.h:137
TDriveNumber
The drive number enumeration.
Definition f32file.h:884
@ EDriveU
Definition f32file.h:889
@ EDriveM
Definition f32file.h:887
@ EDriveK
Definition f32file.h:887
@ EDriveY
Definition f32file.h:889
@ EDriveL
Definition f32file.h:887
@ EDriveW
Definition f32file.h:889
@ EDriveQ
Definition f32file.h:888
@ EDriveJ
Definition f32file.h:886
@ EDriveS
Definition f32file.h:888
@ EDriveD
Definition f32file.h:885
@ EDriveE
Definition f32file.h:885
@ EDriveA
Definition f32file.h:885
@ EDriveO
Definition f32file.h:887
@ EDriveI
Definition f32file.h:886
@ EDriveC
Definition f32file.h:885
@ EDriveB
Definition f32file.h:885
@ EDriveF
Definition f32file.h:886
@ EDriveZ
Definition f32file.h:890
@ EDriveP
Definition f32file.h:888
@ EDriveT
Definition f32file.h:888
@ EDriveH
Definition f32file.h:886
@ EDriveR
Definition f32file.h:888
@ EDriveV
Definition f32file.h:889
@ EDriveN
Definition f32file.h:887
@ EDriveX
Definition f32file.h:889
@ EDriveG
Definition f32file.h:886
const TInt KMaxDrives
The maximum number of available drives.
Definition f32file.h:176
const TUint KFileShareMask
Bit mask provided for retrieving a file's share mode.
Definition f32file.h:1296
NONSHARABLE_CLASS(CFsMountHelper) IMPORT_C TBool FileNamesIdentical(const TDesC &aFileName1, const TDesC &aFileName2)
const TInt KDriveAbsent
Indicates a drive letter which is not in use.
Definition f32file.h:93
TSeek
Flags indicating the destination of a seek operation.
Definition f32file.h:1393
@ ESeekCurrent
Destination is the current position in file.
Definition f32file.h:1411
@ ESeekStart
Destination is the start of file.
Definition f32file.h:1405
@ ESeekAddress
This can only be used for file systems with execute-in-place facilities, such as the ROM file system:...
Definition f32file.h:1399
@ ESeekEnd
Destination is the end of file.
Definition f32file.h:1417
TBuf8< KMaxMapsPerCall *sizeof(TBlockMapEntry)> TBlockArrayDes
Definition f32file.h:1440
TNotifyType
A set of change notification flags.
Definition f32file.h:625
@ ENotifyAll
Any change, including mounting and unmounting drives.
Definition f32file.h:629
@ ENotifyAttributes
Change resulting from: RFs::SetEntry(), RFile::Set(), RFile::SetAtt(), RFile::SetModified() and RFile...
Definition f32file.h:657
@ ENotifyDisk
Change resulting from the RRawDisk::Write() request.
Definition f32file.h:669
@ ENotifyFile
Change resulting from file requests: RFile::Create(), RFile::Replace(), RFile::Rename(),...
Definition f32file.h:643
@ ENotifyEntry
Addition or deletion of a directory entry, or changing or formatting a disk.
Definition f32file.h:635
@ ENotifyDir
Change resulting from directory requests: RFs::MkDir(), RFs::RmDir(), and RFs::Rename().
Definition f32file.h:650
@ ENotifyWrite
Change resulting from the RFile::Write() request.
Definition f32file.h:663
TPckgBuf< TVolFormatParam > TVolFormatParamBuf
package buffer for the objects of class TVolFormatParamBuf
Definition f32file.h:2373
const TUint KEntryAttMaskFileSystemSpecific
The range of entry attributes reserved for file-system specific meanings.
Definition f32file.h:449
TFileCacheFlags
Flags used to enable file server drive-specific caching.
Definition f32file.h:707
@ EFileCacheReadAheadEnabled
Enable read-ahead caching - if file explicitly opened in EFileReadAheadOn mode.
Definition f32file.h:721
@ EFileCacheReadEnabled
Enable read caching - if file explicitly opened in EFileReadBuffered mode.
Definition f32file.h:711
@ EFileCacheReadAheadOn
Enable read-ahead caching, regardless of file open mode.
Definition f32file.h:726
@ EFileCacheWriteEnabled
Enable write caching, if file explicitly opened in EFileWriteBuffered mode.
Definition f32file.h:731
@ EFileCacheReadOn
Enable read caching for all files, regardless of file open mode.
Definition f32file.h:716
@ EFileCacheWriteOn
Enable write caching for all files, regardless of file open mode.
Definition f32file.h:736
__ASSERT_COMPILE(HAL::ENumHalAttributes< 256)
TBlockArrayDes iMap
Definition f32file.h:1444