Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
f32file.h File Reference
#include <e32base.h>
#include <e32svr.h>
#include <e32ldr.h>
#include <f32file.inl>
#include <f32file_private.h>

Go to the source code of this file.

Classes

class  TVolumeIOParamInfo
 Volume IO parameter information. More...
 
class  TBlockMapEntry
 
struct  SBlockMapInfo
 
class  TEntry
 Encapsulates an entry in a directory, which can be another (nested) directory, a file or a volume label. More...
 
class  TEntryArray
 Array of directory entries. More...
 
class  TDriveInfo
 Contains drive information. More...
 
class  TVolumeInfo
 Contains information about a volume mounted on a drive. More...
 
class  TDriveUnit
 Drive numbers and letters. More...
 
class  TParseBase
 Base class for file name parsing. More...
 
class  TParsePtr
 Parses filenames using less space on the stack than TParse. More...
 
class  TParsePtrC
 Parses, but cannot modify, filenames using less space on the stack than TParse. More...
 
class  TParse
 Parses filenames. More...
 
class  CDir
 Array of directory entries that has been read into memory from the file system. More...
 
class  RFs
 A handle to a file server session. More...
 
class  RFs::TNameValidParam
 This class is used to for returning meaningful error code values to users of RFs::IsValidName(const TDesC& ,TNameValidParam& ) More...
 
class  TVolFormatParam
 Base class for volume formatting parameters. More...
 
class  RFile
 Creates and opens a file, and performs all operations on a single open file. More...
 
class  RDir
 Reads the entries contained in a directory. More...
 
class  RFormat
 Formats a device, one step at a time. More...
 
class  RRawDisk
 Enables direct disk access. More...
 
class  MFileManObserver
 Provides notification of the progress of synchronous or asynchronous file management operations. More...
 
class  CFileBase
 Abstract base class for file management. More...
 
class  TFindFile
 Searches for files and directories. More...
 
class  TOpenFileScan
 Scans open files to get a list of the entries for all files which are currently open in a particular file server session. More...
 
class  TFileText
 Reads and writes single lines of text to or from a Unicode file. More...
 

Macros

#define EFSRV_EXPORT_C   EXPORT_C
 
#define EFSRV_IMPORT_C   IMPORT_C
 

Typedefs

typedef TBuf8< KMaxDrives > TDriveList
 Defines a modifiable buffer descriptor to contain a drive list.
 
typedef TBuf< KMaxDriveName > TDriveName
 Defines a modifiable buffer descriptor to contain a drive name.
 
typedef TBuf< KMaxFSNameLength > TFSName
 Defines a modifiable buffer descriptor to contain a file system or file system sub type name.
 
typedef TBuf8< KMaxMapsPerCall *sizeof(TBlockMapEntry)> TBlockArrayDes
 
typedef TPckgBuf< TVolFormatParam > TVolFormatParamBuf
 package buffer for the objects of class TVolFormatParamBuf
 
typedef CDir CFileList
 Contains a list of entries for the files which were opened in a file server session.
 

Enumerations

enum  TNotifyType {
  ENotifyAll =0x01 , ENotifyEntry =0x02 , ENotifyFile =0x04 , ENotifyDir =0x08 ,
  ENotifyAttributes =0x10 , ENotifyWrite =0x20 , ENotifyDisk =0x40
}
 A set of change notification flags. More...
 
enum  TNotifyDismountMode { EFsDismountRegisterClient =0x01 , EFsDismountNotifyClients =0x02 , EFsDismountForceDismount =0x03 }
 Notification modes for safe media removal notification API. More...
 
enum  TFileCacheFlags {
  EFileCacheReadEnabled = 0x01 , EFileCacheReadOn = 0x02 , EFileCacheReadAheadEnabled = 0x04 , EFileCacheReadAheadOn = 0x08 ,
  EFileCacheWriteEnabled = 0x10 , EFileCacheWriteOn = 0x20
}
 Flags used to enable file server drive-specific caching. More...
 
enum  TQueryVolumeInfoExtCmd {
  EFileSystemSubType , EIOParamInfo , EIsDriveSync , EIsDriveFinalised ,
  EFSysExtensionsSupported
}
 Commands to query specific volume information. More...
 
enum  TDriveNumber {
  EDriveA , EDriveB , EDriveC , EDriveD ,
  EDriveE , EDriveF , EDriveG , EDriveH ,
  EDriveI , EDriveJ , EDriveK , EDriveL ,
  EDriveM , EDriveN , EDriveO , EDriveP ,
  EDriveQ , EDriveR , EDriveS , EDriveT ,
  EDriveU , EDriveV , EDriveW , EDriveX ,
  EDriveY , EDriveZ
}
 The drive number enumeration. More...
 
enum  TEntryKey {
  ESortNone =0 , ESortByName , ESortByExt , ESortBySize ,
  ESortByDate , ESortByUid , EDirsAnyOrder =0 , EDirsFirst =0x100 ,
  EDirsLast =0x200 , EAscending =0 , EDescending =0x400 , EDirDescending =0x800
}
 Flags indicating the order in which directory entries are to be sorted. More...
 
enum  TFileMode {
  EFileShareExclusive , EFileShareReadersOnly , EFileShareAny , EFileShareReadersOrWriters ,
  EFileStream =0 , EFileStreamText =0x100 , EFileRead =0 , EFileWrite =0x200 ,
  EFileReadAsyncAll =0x400 , EFileWriteBuffered =0x00000800 , EFileWriteDirectIO =0x00001000 , EFileReadBuffered =0x00002000 ,
  EFileReadDirectIO =0x00004000 , EFileReadAheadOn =0x00008000 , EFileReadAheadOff =0x00010000 , EDeleteOnClose =0x00020000 ,
  EFileBigFile =0x00040000 , EFileSequential =0x00080000
}
 Access and share modes available when opening a file. More...
 
enum  TFormatMode {
  EHighDensity , ELowDensity , EFullFormat =0 , EQuickFormat =0x100 ,
  ESpecialFormat =0x200 , EForceErase =0x400 , EForceFormat = 0x800
}
 The format method. More...
 
enum  TSeek { ESeekAddress , ESeekStart , ESeekCurrent , ESeekEnd }
 Flags indicating the destination of a seek operation. More...
 
enum  TBlockMapUsage { EBlockMapUsagePaging , ETestDebug }
 
enum  TFileManError {
  ENoExtraInformation , EInitializationFailed , EScanNextDirectoryFailed , ESrcOpenFailed ,
  ETrgOpenFailed , ENoFilesProcessed
}
 A list of CFileMan error codes. More...
 

Functions

 __ASSERT_COMPILE (_FOFF(TVolFormatParam, iUId)==0)
 
 NONSHARABLE_CLASS (CDirScan)
 Scans a directory structure.
 
 NONSHARABLE_CLASS (CFileMan)
 Offers file management services which accept the use of wildcards; synchronous and asynchronous.
 
NONSHARABLE_CLASS(CFsMountHelper) IMPORT_C TBool FileNamesIdentical (const TDesC &aFileName1, const TDesC &aFileName2)
 

Variables

const TInt KDefaultDrive =KMaxTInt
 The session default drive.
 
const TInt KDriveAbsent =0x00
 Indicates a drive letter which is not in use.
 
const TInt KFileServerDefaultMessageSlots =-1
 The default value for the number of message slots passed to RFs::Connect().
 
const TInt KEntryArraySize =(0x200*sizeof(TText))
 The size of the array of TEntry items contained in a TEntryArray object.
 
const TInt KPathDelimiter ='\\'
 The character used to separate directories in the path name.
 
const TInt KDriveDelimiter =':'
 The character used to separate the drive letter from the path.
 
const TInt KExtDelimiter ='.'
 The character used to separate the filename from the extension.
 
const TInt KMaxDrives =26
 The maximum number of available drives.
 
const TInt KMaxProxyDrives =KMaxDrives-KMaxLocalDrives
 The maximum number of available proxy drives.
 
const TInt KMaxDriveName =0x02
 The maximum length of a drivename.
 
const TInt KMaxFSNameLength =0x0020
 The maximum length of a file system name or file system sub type name.
 
const TUint KEntryAttNormal =0x0000
 File/directory attribute: any file without the hidden or system attribute.
 
const TUint KEntryAttReadOnly =0x0001
 File/directory attribute: read-only file or directory.
 
const TUint KEntryAttHidden =0x0002
 File/directory attribute: hidden file or directory.
 
const TUint KEntryAttSystem =0x0004
 File/directory attribute: system file.
 
const TUint KEntryAttVolume =0x0008
 File/directory attribute: volume name directory.
 
const TUint KEntryAttDir =0x0010
 File/directory attribute: a directory without the hidden or system attribute.
 
const TUint KEntryAttArchive =0x0020
 File/directory attribute: an archive file.
 
const TUint KEntryAttXIP =0x0080
 File/directory attribute: ROM eXecute In Place file.
 
const TUint KEntryAttRemote =0x0100
 This file attribute bit is set if the file exists only on a remote file system and is not locally cached.
 
const TUint KEntryAttMaskFileSystemSpecific =0x00FF0000
 The range of entry attributes reserved for file-system specific meanings.
 
const TUint KEntryAttMatchMask =(KEntryAttHidden|KEntryAttSystem|KEntryAttDir)
 Bit mask for matching file and directory entries.
 
const TUint KEntryAttMaskSupported =0x3f
 Bit mask for matching file and directory entries.
 
const TUint KEntryAttMatchExclusive =0x40000000
 Bit mask for matching file and directory entries.
 
const TUint KEntryAttUnique =0x01000000
 Bit mask for feature manager file entries.
 
const TUint KEntryAttMatchExclude =0x08000000
 Bit mask for matching file and directory entries.
 
const TUint KEntryAttAllowUid =0x10000000
 Bit mask for matching file and directory entries.
 
const TUint KEntryAttPacked = 0x01000000
 Indicates that a TEntry (that is generally returned from a TEntryArray) is stored in packed format where the iSizeHigh and iReserved fields follow the valid characters of the name string.
 
const TUint KMaxMapsPerCall = 0x8
 
const TUint KFileShareMask =0xff
 Bit mask provided for retrieving a file's share mode.
 
const TInt KFileServerUidValue = 0x100039e3
 The UID of the File Server process.
 

Detailed Description

API status
Published to all clients. Released API.

Definition in file f32file.h.

Macro Definition Documentation

◆ EFSRV_EXPORT_C

#define EFSRV_EXPORT_C   EXPORT_C

Definition at line 1997 of file f32file.h.

◆ EFSRV_IMPORT_C

#define EFSRV_IMPORT_C   IMPORT_C

Definition at line 1998 of file f32file.h.

Typedef Documentation

◆ CFileList

typedef CDir CFileList

Contains a list of entries for the files which were opened in a file server session.

See also
CDir
API status
Published to all clients. Released API.

Definition at line 3322 of file f32file.h.

◆ TBlockArrayDes

API status
Published to all clients. Released API.

Definition at line 1440 of file f32file.h.

◆ TDriveList

typedef TBuf8<KMaxDrives> TDriveList

Defines a modifiable buffer descriptor to contain a drive list.

The descriptor has maximum length KMaxDrives, sufficient to contain all possible drive letters.

See also
RFs::DriveList
KMaxDrives
API status
Published to all clients. Released API.

Definition at line 204 of file f32file.h.

◆ TDriveName

Defines a modifiable buffer descriptor to contain a drive name.

A drive name comprises a drive letter (A through Z) and a colon. KMaxDriveName (2 bytes) is sufficient for a drive letter and colon.

See also
TDriveUnit::Name
KMaxDriveName
API status
Published to all clients. Released API.

Definition at line 237 of file f32file.h.

◆ TFSName

Defines a modifiable buffer descriptor to contain a file system or file system sub type name.

See also
KMaxFSNameLength
API status
Published to all clients. Released API.

Definition at line 266 of file f32file.h.

◆ TVolFormatParamBuf

package buffer for the objects of class TVolFormatParamBuf

Definition at line 2373 of file f32file.h.

Enumeration Type Documentation

◆ TBlockMapUsage

API status
Published to all clients. Released API.
Enumerator
EBlockMapUsagePaging 
ETestDebug 

Definition at line 1453 of file f32file.h.

◆ TDriveNumber

The drive number enumeration.

API status
Published to all clients. Released API.
Enumerator
EDriveA 
EDriveB 
EDriveC 
EDriveD 
EDriveE 
EDriveF 
EDriveG 
EDriveH 
EDriveI 
EDriveJ 
EDriveK 
EDriveL 
EDriveM 
EDriveN 
EDriveO 
EDriveP 
EDriveQ 
EDriveR 
EDriveS 
EDriveT 
EDriveU 
EDriveV 
EDriveW 
EDriveX 
EDriveY 
EDriveZ 

Definition at line 875 of file f32file.h.

◆ TEntryKey

enum TEntryKey

Flags indicating the order in which directory entries are to be sorted.

See also
RFs::GetDir
CDirScan::SetScanDataL
CDir::Sort
API status
Published to all clients. Released API.
Enumerator
ESortNone 

The default; no sorting takes place.

ESortByName 

Sort according to alphabetic order of file and directory name.

This setting is mutually exclusive with ESortByExt, ESortBySize, ESortByDate and ESortByUid.

ESortByExt 

Sort according to alphabetic order of file extension.

Files without an extension take precedence over files with an extension. For files with the same extension or without an extension, the default is to sort by name.

This setting is mutually exclusive with ESortByName, ESortBySize, ESortByDate and ESortByUid.

ESortBySize 

Sort according to file size.

This setting is mutually exclusive with ESortByName, ESortByExt, ESortByDate and ESortByUid.

ESortByDate 

Sort according to files' last modified time and date.

By default, most recent last.

This setting is mutually exclusive with ESortByName, ESortByExt, ESortBySize and ESortByUid.

ESortByUid 

Sort according to file UID.

This setting is mutually exclusive with ESortByName, ESortByExt, ESortBySize and ESortByDate.

EDirsAnyOrder 

Qualifies the sort order; if set, directories are listed in the order in which they occur.

This is the default.

This flag is mutually exclusive with EDirsFirst and EDirslast.

EDirsFirst 

Qualifies the sort order; if set, directories come before files in sort order.

This flag is mutually exclusive with EDirsAnyOrder and EDirsLast.

EDirsLast 

Qualifies the sort order; if set, files come before directories in sort order.

This flag is mutually exclusive with EDirsAnyOrder and EDirsFirst.

EAscending 

Qualifies the sort order; files are sorted in ascending order, i.e.

from A to Z. This is the default behaviour.

This flag is mutually exclusive with EDescending and EDirDescending.

EDescending 

Qualifies the sort order; files are sorted in descending order, i.e.

from Z to A.

This flag is mutually exclusive with EAscending and EDirDescending.

EDirDescending 

Qualifies the sort order; directories are sorted in descending order, i.e.

from Z to A.

This flag shall be used in combination with either EDirsFirst or EDirsLast. This flag is mutually exclusive with EAscending and EDescending.

Definition at line 896 of file f32file.h.

◆ TFileCacheFlags

Flags used to enable file server drive-specific caching.

API status
Published to all clients. Released API.
Enumerator
EFileCacheReadEnabled 

Enable read caching - if file explicitly opened in EFileReadBuffered mode.

EFileCacheReadOn 

Enable read caching for all files, regardless of file open mode.

EFileCacheReadAheadEnabled 

Enable read-ahead caching - if file explicitly opened in EFileReadAheadOn mode.

EFileCacheReadAheadOn 

Enable read-ahead caching, regardless of file open mode.

EFileCacheWriteEnabled 

Enable write caching, if file explicitly opened in EFileWriteBuffered mode.

EFileCacheWriteOn 

Enable write caching for all files, regardless of file open mode.

Definition at line 698 of file f32file.h.

◆ TFileManError

A list of CFileMan error codes.

See also
CFileMan
API status
Published to all clients. Released API.
Enumerator
ENoExtraInformation 

No additional error information is available, either because the latest CFileMan operation did not return an error, or if it did, the error was not one for which additional information is available.

EInitializationFailed 

A leave occurred while setting up the initial scan.

This indicates that the operation did not begin.

See also
CDirScan.
EScanNextDirectoryFailed 

A leave occurred while scanning the next directory in the course of a file management function.

This indicates that the operation did begin.

See also
CDirScan.
ESrcOpenFailed 

Error occurred when attempting to open the source file for a file copy or move.

ETrgOpenFailed 

Error occurred while attempting to create, or, if overwriting is in effect, replace the target file for a file copy or move.

ENoFilesProcessed 

The operation completed without processing any files because no matching files were found.

Definition at line 2758 of file f32file.h.

◆ TFileMode

enum TFileMode

Access and share modes available when opening a file.

The access mode indicates whether the file is opened just for reading or for writing.

The share mode indicates whether other RFile objects can access the open file, and whether this access is read only.

Use EFileShareReadersOrWriters if a client does not care whether the file has been previously opened for ReadOnly or Read/Write access.

If EFileShareReadersOrWriters is not used, then a client needs to cooperate with other clients in order to open the file with the correct share mode, either EFileShareReadersOnly or EFileShareAny, depending on the share mode used when the file was originally opened.

To open a file for reading and writing with read and write shared access, use:

_LIT(KFilename, "filename.ext");
RFile file;
file.Open(theFs, KFilename, EFileShareAny | EFileWrite);
Creates and opens a file, and performs all operations on a single open file.
Definition f32file.h:2518
EFSRV_IMPORT_C TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode)
Opens an existing file for reading or writing.
_LIT(KNullDesC,"")
Defines an empty or null literal descriptor.
@ EFileShareAny
Shared access for reading and writing.
Definition f32file.h:1164
@ EFileWrite
The file may be read from and written to.
Definition f32file.h:1202

If another instance of RFile tries to open this file in EFileShareExclusive or EFileShareReadersOnly mode, access is denied. However, it can be opened in EFileShareAny mode or EFileShareReadersOrWriters mode.

If a file is opened with EFileShareReadersOrWriters, and the file is opened for sharing by another client, then the file share mode is promoted to the new share mode. When the file handle is closed then the share mode is demoted back to EFileShareReadersOrWriters.

Table of FileShare promotion
rules-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Client A Client B Resultant Share
Mode-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --ReadersOnly
ReadersOnly ReadersOnly ReadersOnly ReadersOrWriters |
EFileRead ReadersOnly ReadersOnly ReadersOrWriters |
EFileWrite INCOMPATIBLE ReadersOnly Any INCOMPATIBLE
ReadersOrWriters |
EFileRead ReadersOnly ReadersOnly ReadersOrWriters |
EFileRead ReadersOrWriters | EFileRead ReadersOrWriters ReadersOrWriters |
EFileRead ReadersOrWriters | EFileWrite ReadersOrWriters ReadersOrWriters |
EFileRead Any Any
ReadersOrWriters |
EFileWrite ReadersOnly INCOMPATIBLE ReadersOrWriters |
EFileWrite ReadersOrWriters | EFileRead ReadersOrWriters ReadersOrWriters |
EFileWrite ReadersOrWriters | EFileWrite ReadersOrWriters ReadersOrWriters |
EFileWrite Any Any
Any ReadersOnly INCOMPATIBLE Any ReadersOrWriters |
EFileRead Any Any ReadersOrWriters | EFileWrite Any Any Any Any
@ EFileRead
The file may be read from but not written to.
Definition f32file.h:1194

Use the following guidance notes for selecting FileShare mode with shared RFile objects:

EFileShareAny

  • Use this mode to request both read and write access when another client needs to write to the file and respective client access to the file is coordinated.
  • To open a file for non-exclusive write, use EFileShareAny | EFileWrite.
  • It is recommended that either EFileShareAny or EFileShareAny | EFileRead are not used. These combinations will block users attempting to use the EFileShareReadersOnly mode even if all the EFileShareAny handles do not have the EFileWrite bit set as the EFileRead and EFileWrite bits have no affect on sharing. Use either EFileShareReadersOnly or EFileShareReadersOrWriters.

EFileShareReadersOrWriters

  • Use this mode when it does not matter if another file writes to the file and file access can not be coordinated as other clients are unknown.
  • To open a file for shared read access whilst permitting writers, use EFileShareReadersOrWriters | EFileRead.
  • For write access with unrestricted share mode, EFileShareReadersOrWriters | EFileWrite may be used however EFilesShareAny | EFileWrite is preferred.

EFileShareReadersOnly

  • Use this mode to get read access to the file and deny write access for any other handles on this file.
  • To open a file for shared read access whilst disallowing writers use EFileShareReadersOnly.

Files may be opened in text or binary mode. Native Symbian OS application files are nearly all binary, (so they will usually be opened in binary mode). However, they can be opened in text mode (to support testing, and to make them compatible with text formats on remote systems). Symbian OS native text format uses CR-LF (ASCII 0x0d, 0x0a) to denote the end of a line. When reading, however, any combination of CR, LF, LF-CR or CR-LF is recognised as the end of a line. Where a remote file system uses a different format, it is the responsibility of the installable file system to present an interface for text files which conforms with this format.

The share mode may be OR’ed with either EFileStream or EFileStreamText.

Additionally, it may be OR’ed with either EFileRead or EFileWrite.

API status
Published to all clients. Released API.
Enumerator
EFileShareExclusive 

Exclusive access for the program opening the file.

No other program can access the file until it is closed. If another program is already accessing the file in any share mode, then an attempt to open it with an EFileShareExclusive will fail.

EFileShareReadersOnly 

Read-only sharing.

This means that the file may only be accessed for reading. A file cannot be opened using a share mode of EFileShareReadersOnly with an EFileWrite flag.

EFileShareAny 

Shared access for reading and writing.

This means that other programs may share access to the file for reading and writing with the program which opened the file.

When using this mode, the program is expecting another program to be able to write to the file, so is not compatible with EFileShareReadersOnly.

EFileShareReadersOrWriters 

Shared access for reading and writing.

This means that other programs may share access to the file for reading and writing with the program which opened the file.

When using this mode, the program does not care if another program has the file open for read or write access.

EFileStream 

For files to be opened in binary mode.

EFileStreamText 

For files to be opened in text mode.

EFileRead 

The file may be read from but not written to.

EFileWrite 

The file may be read from and written to.

Cannot be combined with a share mode of EFileShareReadersOnly.

EFileReadAsyncAll 

Specifies that an asynchronous read request should not be completed until all requested data becomes available.

Cannot be combined with the EFileShareExclusive or EFileShareReadersOnly share modes as this will prohibit a writer from updating the file.

EFileWriteBuffered 

Enables write buffering.

EFileWriteDirectIO 

Disables write buffering.

EFileReadBuffered 

Enables read buffering.

EFileReadDirectIO 

Disables read buffering.

EFileReadAheadOn 

Enables read ahead.

EFileReadAheadOff 

Disables read ahead.

EDeleteOnClose 

Enable delete on close.

EFileBigFile 
Enables operations on large files.
API status
Internal technology API.
EFileSequential 

Using this flag implies that the client is making large sequential reads and/or writes and it is interested in maximising the performance of the large reads and/or writes.

The flag gives a hint to the file server and filesystem to adjust to a streaming data pattern and try their best to make it optimal.

Some conditions apply:

  • This does not guarantee that the performance of read/write operations will increase.
  • Using this flag for other purposes other than data streaming may lead to performance degradation.
  • This may sacrifice user data integrity for the sake of performance.

If a file is opened by Client A with EFileSequential, and the file is then opened without EFileSequential by Client B, then this file mode will be disabled. When the file handle is closed by Client B, then the EFileSequential file mode will be enabled again. Therefore, this mode will only be enabled if all clients set the file as such, otherwise the file mode will be disabled.

FAT file system specific information: This flag improves write and file expansion performance whilst decreasing robustness on a "Rugged-FAT" file system, which is applicable to internal non-removable drives.

Definition at line 1023 of file f32file.h.

◆ TFormatMode

The format method.

API status
Published to all clients. Released API.
Enumerator
EHighDensity 

Indicates a high density floppy disk to be formatted.

Obsolete.

Can be ORed with EFullFormat or EQuickFormat, but does not have any effect.

ELowDensity 

Indicates a low density floppy disk to be formatted.

Obsolete.

Can be ORed with EFullFormat or EQuickFormat, but does not have any effect.

EFullFormat 

Performs a full format, erasing whole media content and creating new file system layout.

This is the default mode.

EQuickFormat 

Performs a quick media format, erasing only required minimum media content.

For example, for FAT file system it resets FAT and root directory content. Also preserves bad sectors if there are some on the volume.

ESpecialFormat 

Indicates a custom formatting mode.

In this mode some optional file system specific parameters may be passed to RFormat::Open().

See also
TLDFormatInfo
TInt RFormat::Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);
EForceErase 

Forced erase of locked media.

EForceFormat 

This flag enables formatting the volume even if it has files or directories opened on it.

If this flag is specified, the volume will be forcedly dismounted before performing media formatting.

Even with this flag the RFormat::Open() can fail with KErrInUse in following cases:

  1. if there are clamped files on the volume.
  2. there are opened "disk access" objects, like RFormat or RRawDisk on the volume.

Definition at line 1301 of file f32file.h.

◆ TNotifyDismountMode

Notification modes for safe media removal notification API.

See also
RFs::NotifyDismount
API status
Published to all clients. Released API.
Enumerator
EFsDismountRegisterClient 

Used by a client to register for notification of pending dismount.

This is the default behaviour for RFs::NotifyDismount

EFsDismountNotifyClients 

Used for graceful file system dismounting with notifying clients of a pending dismount.

If all clients have responded by RFs::AllowDismount(), the file system will be dismounted.

EFsDismountForceDismount 

Used to forcibly dismount the file system without notifying clients.

Definition at line 682 of file f32file.h.

◆ TNotifyType

A set of change notification flags.

These flags indicate the kind of change that should result in notification.

This is useful for programs that maintain displays of file lists that must be dynamically updated.

See also
RFs::NotifyChange
RFs
RFile
RRawDisk
API status
Published to all clients. Released API.
Enumerator
ENotifyAll 

Any change, including mounting and unmounting drives.

ENotifyEntry 

Addition or deletion of a directory entry, or changing or formatting a disk.

ENotifyFile 

Change resulting from file requests: RFile::Create(), RFile::Replace(), RFile::Rename(), RFs::Delete(), RFs::Replace(), and RFs::Rename().

ENotifyDir 

Change resulting from directory requests: RFs::MkDir(), RFs::RmDir(), and RFs::Rename().

ENotifyAttributes 

Change resulting from: RFs::SetEntry(), RFile::Set(), RFile::SetAtt(), RFile::SetModified() and RFile::SetSize() requests.

ENotifyWrite 

Change resulting from the RFile::Write() request.

ENotifyDisk 

Change resulting from the RRawDisk::Write() request.

Definition at line 606 of file f32file.h.

◆ TQueryVolumeInfoExtCmd

Commands to query specific volume information.

See also
TVolumeIOParamInfo
API status
Published to all clients. Released API.
Enumerator
EFileSystemSubType 

Queries the sub type of the file system mounted on a specified volume.

For example, FAT12, FAT16 or FAT32.

EIOParamInfo 

Queries the I/O parameters of a specificed volume.

This includes the block size, the cluster size and the recommended read and write sizes for the media.

EIsDriveSync 

This command determines whether the volume is synchronous or asynchronous.

A boolean value is returned within the buffer defined as TPckgBuf<TBool>. ETrue for Synchronous and EFalse for Asynchronous.

EIsDriveFinalised 

Query if the given drive is finalised.

See RFs::FinaliseDrive() Not all file systems may support this query. A boolean value is returned within the buffer defined as TPckgBuf<TBool>. ETrue value means that the drive is finalised

EFSysExtensionsSupported 

Query the volume to ascertain whether File system extensions are supported on this volume.

A boolean value is returned within the buffer defined as TPckgBuf<TBool>. ETrue value means that extensions are supported. EFalse means they are not supported.

Definition at line 749 of file f32file.h.

◆ TSeek

enum TSeek

Flags indicating the destination of a seek operation.

File locations are specified as a 32-bit signed integer, allowing offsets of ?GB from the origin of the seek.

See also
RFile::Seek
API status
Published to all clients. Released API.
Enumerator
ESeekAddress 

This can only be used for file systems with execute-in-place facilities, such as the ROM file system: the offset specifies the absolute address of the data.

ESeekStart 

Destination is the start of file.

ESeekCurrent 

Destination is the current position in file.

ESeekEnd 

Destination is the end of file.

Definition at line 1379 of file f32file.h.

Function Documentation

◆ __ASSERT_COMPILE()

__ASSERT_COMPILE ( _FOFF(TVolFormatParam, iUId)  = =0)

◆ FileNamesIdentical()

NONSHARABLE_CLASS(CFsMountHelper) IMPORT_C TBool FileNamesIdentical ( const TDesC &  aFileName1,
const TDesC &  aFileName2 
)
API status
Published to all clients. Released API.

◆ NONSHARABLE_CLASS() [1/2]

NONSHARABLE_CLASS ( CDirScan  )

Scans a directory structure.

The scan moves from directory to directory through the hierarchy, returning a list of the entries contained in each. The order in which the directories are scanned is determined by a sort key which is specified when setting up the scan. The base directory to be scanned and the entry types of interest must also be specified before performing the scan.

This class is not intended for user derivation

API status
Published to all clients. Released API.

Defines the scan direction.

Scan upwards from the lowest level directory in the hierarchy to the top level directory.

Scan downwards from the top level directory in the hierarchy to the bottom level directory.

Definition at line 2691 of file f32file.h.

◆ NONSHARABLE_CLASS() [2/2]

NONSHARABLE_CLASS ( CFileMan  )

Offers file management services which accept the use of wildcards; synchronous and asynchronous.

It also provides enquiry functions, which, like those provided by the base class CFileBase, may be used by an observer class object to provide the user with information about the progress of the operation.

All of the file management functions provided by this class accept the use of wildcards, and may operate either synchronously or asynchronously. When CFileMan is operating asynchronously, the operation takes place in a separate thread from the calling code.

A file notification observer (an instance of a class deriving from MFileManObserver) may optionally be used by CFileMan when operating synchronously or asynchronously. If provided, the appropriate notification function is called before or after each entry has been processed, or during a file copy or move. This notification can be used to provide information about the state of the operation, such as the number of bytes transferred during a large-scale file copy. It can also be used to allow the user to cancel, retry or continue processing an entry, or to abort the whole operation. If such notification is required, specify an object deriving from MFileManObserver class in the constructor, or call SetObserver(), defined in the base class, CFileBase.

All of the file manipulation functions except Rename() may operate recursively, and all can operate non-recursively. When operating recursively, these functions will act on all matching files located throughout the source directory’s hierarchy. When operating non-recursively, these functions act upon files contained in the single top level source directory only. Recursion is set or unset using the switch parameter to these functions.

This class is not intended for user derivation.

Note:

To support wildcard, CFileMan needs to store the entire directory entry information. Therefore, in a extreme condition, if a directory contains a huge number of files (e.g. more than 15000 files with 10 characters' long file names), user may encounter KErrNoMemory errors. Developers who have a need to handle this rare case should increase the heap size limitation of their applications.

For more information about heap size configuration, please refer following section in Symbian Developer Library: Symbian OS build guide >> Build Tools Reference >> MMP file syntax >> epocheapsize

See also
MFileManObserver
API status
Published to all clients. Released API.

An enumeration that identifies CFileMan tasks. This enumeration is used by CurrentAction() to identify which task currently being carried out.

See also
CFileMan::CurrentAction

Inactive

Setting attributes

Copying files

Deleting files

Moving files

Renaming files

Deleting a directory and all contents

Renaming component to VFAT short name (guaranteed to be unique)

Copying file from open file handle

Overwriting and recursion switch.

Used in CFileMan functions to set whether operations are applied to the specified directory and all directories below it, or the specified directory only.

Any files in the destination directory that have the same name as the source files in a rename, move or copy operation, will be overwritten.

Recursive operation.

This is an internal enumeration for CFileMan implementation. THis enumeration is mapped into TAction when user wants to identify the current task of CFileMan by CurrentAction().

See also
CFileMan::TAction
CFileMan::CurrentAction

Internal indicator for None operation. This is mapped to CFileMan::ENone.

Internal indicator for Attribs() operation. This is mapped to CFileMan::EAttribs.

Internal indicator for Copy() operation. This is mapped to CFileMan::ECopy.

Internal indicator for Delete() operation. This is mapped to CFileMan::EDelete.

Internal indicator for Move() operation on different drives. This is mapped to CFileMan::Move.

Internal indicator for Move() operation on the same drive. This is mapped to CFileMan::Rename. Note for compatibility reasons, it is not mapped to CFileMan::Move.

Internal indicator for Rename() operation. This is mapped to CFileMan::ERename.

Internal indicator for RmDir() operation. This is mapped to CFileMan::ERmDir.

Internal indicator for RenameInvalidEntry() operation. This is mapped to CFileMan::ERenameInvalidEntry.

Internal indicator for CopyFromHandle() operation. This is mapped to CFileMan::ECopyFromHandle.

Definition at line 2960 of file f32file.h.

Variable Documentation

◆ KDefaultDrive

const TInt KDefaultDrive =KMaxTInt

The session default drive.

API status
Published to all clients. Released API.

Definition at line 78 of file f32file.h.

◆ KDriveAbsent

const TInt KDriveAbsent =0x00

Indicates a drive letter which is not in use.

This is useful when scanning a drive list to find which drives are available.

API status
Published to all clients. Released API.

Definition at line 93 of file f32file.h.

◆ KDriveDelimiter

const TInt KDriveDelimiter =':'

The character used to separate the drive letter from the path.

API status
Published to all clients. Released API.

Definition at line 150 of file f32file.h.

◆ KEntryArraySize

const TInt KEntryArraySize =(0x200*sizeof(TText))

The size of the array of TEntry items contained in a TEntryArray object.

See also
TEntryArray
TEntry
API status
Published to all clients. Released API.

Definition at line 124 of file f32file.h.

◆ KEntryAttAllowUid

const TUint KEntryAttAllowUid =0x10000000

Bit mask for matching file and directory entries.

Bit mask flag used when UID information should be included in the directory entry listing.

See also
RFs::GetDir
API status
Published to all clients. Released API.

Definition at line 576 of file f32file.h.

◆ KEntryAttArchive

const TUint KEntryAttArchive =0x0020

File/directory attribute: an archive file.

API status
Published to all clients. Released API.

Definition at line 357 of file f32file.h.

◆ KEntryAttDir

const TUint KEntryAttDir =0x0010

File/directory attribute: a directory without the hidden or system attribute.

API status
Published to all clients. Released API.

Definition at line 344 of file f32file.h.

◆ KEntryAttHidden

const TUint KEntryAttHidden =0x0002

File/directory attribute: hidden file or directory.

API status
Published to all clients. Released API.

Definition at line 305 of file f32file.h.

◆ KEntryAttMaskFileSystemSpecific

const TUint KEntryAttMaskFileSystemSpecific =0x00FF0000

The range of entry attributes reserved for file-system specific meanings.

File systems may assign meaning to these bits, but their definition will not be supported nor maintained by Symbian.

All other file attribute bits are reserved for use by Symbian.

The following table summarises the assignment of attribute bits:

 0 - KEntryAttReadOnly
 1 - KEntryAttHidden
 2 - KEntryAttSystem
 3 - KEntryAttVolume

 4 - KEntryAttDir
 6 - KEntryAttArchive
 7 - KEntryAttXIP

 8 - KEntryAttRemote
 9 - Reserved
10 - Reserved
11 - Reserved

12 - Reserved
13 - Reserved
14 - Reserved
15 - Reserved

16 - File System Specific
17 - File System Specific
18 - File System Specific
19 - File System Specific

20 - File System Specific
22 - File System Specific
22 - File System Specific
23 - File System Specific

24 - KEntryAttPacked
25 - Reserved
26 - Reserved
27 - KEntryAttMatchExclude

28 - KEntryAttAllowUid
29 - Reserved
30 - KEntryAttMatchExclusive
31 - Reserved
API status
Published to all clients. Released API.

Definition at line 449 of file f32file.h.

◆ KEntryAttMaskSupported

const TUint KEntryAttMaskSupported =0x3f

Bit mask for matching file and directory entries.

This is used when all entry types, including hidden and system files, but excluding the volume entry are to be matched.

See also
RFs::GetDir
API status
Published to all clients. Released API.

Definition at line 489 of file f32file.h.

◆ KEntryAttMatchExclude

const TUint KEntryAttMatchExclude =0x08000000

Bit mask for matching file and directory entries.

It is used to exclude files or directories with certain attributes from directory listings. This bitmask has the opposite effect to KEntryAttMatchExclusive. For example:

const TUint KEntryAttReadOnly
File/directory attribute: read-only file or directory.
Definition f32file.h:292
const TUint KEntryAttMatchExclude
Bit mask for matching file and directory entries.
Definition f32file.h:558

excludes all read only entries from the directory listing.

const TUint KEntryAttMatchExclusive
Bit mask for matching file and directory entries.
Definition f32file.h:511

lists only read only entries.

See also
KEntryAttMatchExclusive
RFs::GetDir
API status
Published to all clients. Released API.

Definition at line 558 of file f32file.h.

◆ KEntryAttMatchExclusive

const TUint KEntryAttMatchExclusive =0x40000000

Bit mask for matching file and directory entries.

This is used for exclusive matching. When OR'ed with one or more file attribute constants, for example, KEntryAttNormal, it ensures that only the files with those attributes are matched. When OR’ed with KEntryAttDir, directories only (not hidden or system) are matched.

See also
KEntryAttDir
KEntryAttNormal
RFs::GetDir
API status
Published to all clients. Released API.

Definition at line 511 of file f32file.h.

◆ KEntryAttMatchMask

const TUint KEntryAttMatchMask =(KEntryAttHidden|KEntryAttSystem|KEntryAttDir)

Bit mask for matching file and directory entries.

This mask ensures that directories and hidden and system files are matched.

(Note that KEntryAttNormal matches all entry types except directories, hidden and system entries).

See also
RFs::GetDir
API status
Published to all clients. Released API.

Definition at line 470 of file f32file.h.

◆ KEntryAttNormal

const TUint KEntryAttNormal =0x0000

File/directory attribute: any file without the hidden or system attribute.

API status
Published to all clients. Released API.

Definition at line 279 of file f32file.h.

◆ KEntryAttPacked

const TUint KEntryAttPacked = 0x01000000

Indicates that a TEntry (that is generally returned from a TEntryArray) is stored in packed format where the iSizeHigh and iReserved fields follow the valid characters of the name string.

Before accessing the aforementioned members, the entry must be unpacked.

API status
Published to all clients. Released API.

Definition at line 592 of file f32file.h.

◆ KEntryAttReadOnly

const TUint KEntryAttReadOnly =0x0001

File/directory attribute: read-only file or directory.

API status
Published to all clients. Released API.

Definition at line 292 of file f32file.h.

◆ KEntryAttRemote

const TUint KEntryAttRemote =0x0100

This file attribute bit is set if the file exists only on a remote file system and is not locally cached.

Due to the potential high-latency of remote file systems, applications (or users of applications) may make use of this bit to modify their behaviour when working with remote files.

This is a read-only attribute, so any attempt to set this attribute will will be ignored.

API status
Published to all clients. Released API.

Definition at line 391 of file f32file.h.

◆ KEntryAttSystem

const TUint KEntryAttSystem =0x0004

File/directory attribute: system file.

API status
Published to all clients. Released API.

Definition at line 318 of file f32file.h.

◆ KEntryAttUnique

const TUint KEntryAttUnique =0x01000000

Bit mask for feature manager file entries.

It is used in order to identify each ROM feature set data file uniquely in the mount order of ROM sections.

API status
Published to all clients. Released API.

Definition at line 527 of file f32file.h.

◆ KEntryAttVolume

const TUint KEntryAttVolume =0x0008

File/directory attribute: volume name directory.

API status
Published to all clients. Released API.

Definition at line 331 of file f32file.h.

◆ KEntryAttXIP

const TUint KEntryAttXIP =0x0080

File/directory attribute: ROM eXecute In Place file.

API status
Published to all clients. Released API.

Definition at line 370 of file f32file.h.

◆ KExtDelimiter

const TInt KExtDelimiter ='.'

The character used to separate the filename from the extension.

API status
Published to all clients. Released API.

Definition at line 163 of file f32file.h.

◆ KFileServerDefaultMessageSlots

const TInt KFileServerDefaultMessageSlots =-1

The default value for the number of message slots passed to RFs::Connect().

See also
RFs::Connect
API status
Published to all clients. Released API.

Definition at line 108 of file f32file.h.

◆ KFileServerUidValue

const TInt KFileServerUidValue = 0x100039e3

The UID of the File Server process.

API status
Published to all clients. Released API.

Definition at line 3469 of file f32file.h.

◆ KFileShareMask

const TUint KFileShareMask =0xff

Bit mask provided for retrieving a file's share mode.

See also
TFileMode
API status
Published to all clients. Released API.

Definition at line 1296 of file f32file.h.

◆ KMaxDriveName

const TInt KMaxDriveName =0x02

The maximum length of a drivename.

Sufficient for a drive letter and colon.

API status
Published to all clients. Released API.

Definition at line 218 of file f32file.h.

◆ KMaxDrives

const TInt KMaxDrives =26

The maximum number of available drives.

API status
Published to all clients. Released API.

Definition at line 176 of file f32file.h.

◆ KMaxFSNameLength

const TInt KMaxFSNameLength =0x0020

The maximum length of a file system name or file system sub type name.

32 characters is sufficient for a file system or sub type name.

API status
Published to all clients. Released API.

Definition at line 251 of file f32file.h.

◆ KMaxMapsPerCall

const TUint KMaxMapsPerCall = 0x8
API status
Published to all clients. Released API.

Definition at line 601 of file f32file.h.

◆ KMaxProxyDrives

const TInt KMaxProxyDrives =KMaxDrives-KMaxLocalDrives

The maximum number of available proxy drives.

API status
Published to all clients. Released API.

Definition at line 187 of file f32file.h.

◆ KPathDelimiter

const TInt KPathDelimiter ='\\'

The character used to separate directories in the path name.

API status
Published to all clients. Released API.

Definition at line 137 of file f32file.h.