--- a/userlibandfileserver/fileserver/sfat/sl_fsy.cpp Mon Oct 19 15:55:17 2009 +0100
+++ b/userlibandfileserver/fileserver/sfat/sl_fsy.cpp Mon Dec 21 16:14:42 2009 +0000
@@ -15,6 +15,14 @@
//
//
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//!!
+//!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
+//!!
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
#include "sl_std.h"
#include <e32hal.h>
@@ -22,154 +30,154 @@
//
// Create a FatFileSystem
//
- {
- CFatFileSystem* fatfsys=new CFatFileSystem();
- if (fatfsys==NULL)
- return(NULL);
+ {
+ CFatFileSystem* fatfsys=new CFatFileSystem();
+ if (fatfsys==NULL)
+ return(NULL);
- return fatfsys;
- }
+ return fatfsys;
+ }
CFatFileSystem::CFatFileSystem() : iUseLocalTimeIfRemovable(EFalse)
//
// Construct the file system
//
- {
- }
+ {
+ }
CFatFileSystem::~CFatFileSystem()
//
// Destructor
//
- {
- }
+ {
+ }
TInt CFatFileSystem::Install()
//
// Install the file system
//
- {
- iVersion=TVersion(KF32MajorVersionNumber,KF32MinorVersionNumber,KF32BuildVersionNumber);
+ {
+ iVersion=TVersion(KF32MajorVersionNumber,KF32MinorVersionNumber,KF32BuildVersionNumber);
- // Read in setting from the config file to possibly make file server
- // use local time.
- _LIT8(KFatConfigSection, "FatConfig");
- _LIT8(KLocalTimeIfRemovable, "LocalTimeIfRemovable");
- F32Properties::GetBool(KFatConfigSection, KLocalTimeIfRemovable, iUseLocalTimeIfRemovable);
+ // Read in setting from the config file to possibly make file server
+ // use local time.
+ _LIT8(KFatConfigSection, "FatConfig");
+ _LIT8(KLocalTimeIfRemovable, "LocalTimeIfRemovable");
+ F32Properties::GetBool(KFatConfigSection, KLocalTimeIfRemovable, iUseLocalTimeIfRemovable);
- return(SetName(&KFileSystemName_FAT));
- }
+ return(SetName(&KFileSystemName_FAT));
+ }
CMountCB* CFatFileSystem::NewMountL() const
//
// Create a new mount control block.
//
- {
+ {
- return(CFatMountCB::NewL());
- }
+ return(CFatMountCB::NewL());
+ }
CFileCB* CFatFileSystem::NewFileL() const
//
// Create a new file.
//
- {
+ {
- return(new(ELeave) CFatFileCB());
- }
+ return(new(ELeave) CFatFileCB());
+ }
CDirCB* CFatFileSystem::NewDirL() const
//
// Create a new directory lister.
//
- {
+ {
- return(CFatDirCB::NewL());
- }
+ return(CFatDirCB::NewL());
+ }
CFormatCB* CFatFileSystem::NewFormatL() const
//
// Create a new media formatter.
//
- {
+ {
- return (new(ELeave) CFatFormatCB());
- }
+ return (new(ELeave) CFatFormatCB());
+ }
TInt CFatFileSystem::DefaultPath(TDes& aPath) const
//
// Return the initial default path.
//
- {
+ {
- aPath=_L("?:\\");
- aPath[0] = (TUint8) RFs::GetSystemDriveChar();
- return(KErrNone);
- }
+ aPath=_L("?:\\");
+ aPath[0] = (TUint8) RFs::GetSystemDriveChar();
+ return(KErrNone);
+ }
void CFatFileSystem::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const
//
// Return the drive info. iBatteryState are already set.
//
- {
+ {
- if(!IsValidLocalDriveMapping(aDriveNumber))
- return;
+ if(!IsValidLocalDriveMapping(aDriveNumber))
+ return;
TLocalDriveCapsV2Buf localDriveCaps;
-
- TInt r = KErrNone;
+
+ TInt r = KErrNone;
- // is the drive local?
- if (!IsProxyDrive(aDriveNumber))
- {
- // if not valid local drive, use default values in localDriveCaps
- // if valid local drive and not locked, use TBusLocalDrive::Caps() values
- // if valid drive and locked, hard-code attributes
- r = GetLocalDrive(aDriveNumber).Caps(localDriveCaps);
- }
- else // this need to be made a bit nicer
- {
- CExtProxyDrive* pD = GetProxyDrive(aDriveNumber);
- if(pD)
- r = pD->Caps(localDriveCaps);
- else
- r = KErrNotReady; // What should the behaviour really be here?
- }
+ // is the drive local?
+ if (!IsProxyDrive(aDriveNumber))
+ {
+ // if not valid local drive, use default values in localDriveCaps
+ // if valid local drive and not locked, use TBusLocalDrive::Caps() values
+ // if valid drive and locked, hard-code attributes
+ r = GetLocalDrive(aDriveNumber).Caps(localDriveCaps);
+ }
+ else // this need to be made a bit nicer
+ {
+ CExtProxyDrive* pD = GetProxyDrive(aDriveNumber);
+ if(pD)
+ r = pD->Caps(localDriveCaps);
+ else
+ r = KErrNotReady; // What should the behaviour really be here?
+ }
- if (r != KErrLocked )
- {
- anInfo.iMediaAtt=localDriveCaps().iMediaAtt;
- }
- else
- {
- anInfo.iMediaAtt = KMediaAttLocked | KMediaAttLockable | KMediaAttHasPassword;
- }
+ if (r != KErrLocked )
+ {
+ anInfo.iMediaAtt=localDriveCaps().iMediaAtt;
+ }
+ else
+ {
+ anInfo.iMediaAtt = KMediaAttLocked | KMediaAttLockable | KMediaAttHasPassword;
+ }
- anInfo.iType=localDriveCaps().iType;
- anInfo.iDriveAtt=localDriveCaps().iDriveAtt;
- }
+ anInfo.iType=localDriveCaps().iType;
+ anInfo.iDriveAtt=localDriveCaps().iDriveAtt;
+ }
TBool CFatFileSystem::IsExtensionSupported() const
//
//
//
- {
- return(ETrue);
- }
+ {
+ return(ETrue);
+ }
TBool CFatFileSystem::GetUseLocalTime() const
- {
- return iUseLocalTimeIfRemovable;
- }
+ {
+ return iUseLocalTimeIfRemovable;
+ }
void CFatFileSystem::SetUseLocalTime(TBool aFlag)
- {
- iUseLocalTimeIfRemovable = aFlag;
- }
+ {
+ iUseLocalTimeIfRemovable = aFlag;
+ }
/**
Reports whether the specified interface is supported - if it is,
@@ -186,7 +194,7 @@
switch(aInterfaceId)
{
case CFileSystem::EProxyDriveSupport: // The FAT Filesystem supports proxy drives
- return KErrNone;
+ return KErrNone;
default:
return(CFileSystem::GetInterface(aInterfaceId, aInterface, aInput));