PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBFileSystem
Wrapper Class for the IFileSystem interface.
#include <SFBFileSystem.h.hpp>
class SFBFileSystem : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBFileSystem)

Inheritance diagram

 Inheritance diagram of SFBFileSystemClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X X O

Reference

BREW API IFileSystem

Member

Public Functions
SFCError Access( ACharConstPtr path , SInt32 mode )
Checks the pathname pointed to by the pszPath argument for accessibility according to the bit pattern contained in Mode.
SFCError Access( SFXAnsiStringConstRef path , SInt32 mode )
Checks the pathname pointed to by the pszPath argument for accessibility according to the bit pattern contained in Mode.
SFCError MkDir( ACharConstPtr path )
Creates a new directory.
SFCError MkDir( SFXAnsiStringConstRef path )
Creates a new directory.
static
SFBFileSystemSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBFileSystem instance.
static
SFBFileSystemSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBFileSystem instance.
SFCError Rename( ACharConstPtr oldpath , ACharConstPtr newpath )
Rename an existing file to a new location, which must not already exist. Renaming a directory is not supported.
SFCError Rename( SFXAnsiStringConstRef oldpath , SFXAnsiStringConstRef newpath )
Rename an existing file to a new location, which must not already exist. Renaming a directory is not supported.
SFCError RmDir( ACharConstPtr path )
The IFileSystem_RmDir() removes an existing, but empty, directory.
SInt32 RmDir( SFXAnsiStringConstRef path )
The IFileSystem_RmDir() removes an existing, but empty, directory.
SFCError Stat( ACharConstPtr path , FSStat * buf , SInt32 size )
The IFileSystem_Stat() obtains information about a file or directory.
SInt32 Stat( SFXAnsiStringConstRef path , FSStat * buf , SInt32 size )
The IFileSystem_Stat() obtains information about a file or directory.
SFCError StatVFS( ACharConstPtr path , FSStatVFS * buf , SInt32 size )
The IFileSystem_StatVFS() obtains information about the virtual file system that contains the pszPath argument.
SInt32 StatVFS( SFXAnsiStringConstRef path , FSStatVFS * buf , SInt32 size )
The IFileSystem_StatVFS() obtains information about the virtual file system that contains the pszPath argument.
SFCError Truncate( ACharConstPtr path , SInt32 length )
Truncate a file to the specified length.
SFCError Truncate( SFXAnsiStringConstRef path , SInt32 length )
Truncate a file to the specified length.
SFCError Unlink( ACharConstPtr path )
Remove a file from a directory.
SFCError Unlink( SFXAnsiStringConstRef path )
Remove a file from a directory.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBFileSystem::Access
Checks the pathname pointed to by the pszPath argument for accessibility according to the bit pattern contained in Mode.
[ public ]
SFCError Access(
    ACharConstPtr path   // the path to the file of interest 
    SInt32 mode          // mode to be checked for accessibility 
);
[ public ]
SFCError Access(
    SFXAnsiStringConstRef path   // the path to the file of interest 
    SInt32 mode                  // mode to be checked for accessibility 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

Common error codes:

  • AEE_EBADPARM: Path is empty
  • AEE_EPRIVLEVEL: "pszPath" is not accessible via the given mode

Reference

BREW API IFileSystem_Access


SFBFileSystem::MkDir
Creates a new directory.
[ public ]
SFCError MkDir(
    ACharConstPtr path   // the path to the new directory 
);
[ public ]
SFCError MkDir(
    SFXAnsiStringConstRef path   // the path to the new directory 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

Common error codes:

  • AEEFS_EFILEEXISTS, AEEFS_EDIREXISTS: If a file or directory of that name already exists, one of the 2 listed error code is returned.
  • AEE_EBADPARM: Path is empty
  • AEEFS_EFSFULL: If the FS is full AEEFS_EDIRNOEXISTS, AEEFS_EFILENOEXISTS,
  • AEEFS_EINVALIDOPERATION: Any one error code from the 3 listed if the parent directory does not exist.

Reference

BREW API IFileSystem_MkDir


SFBFileSystem::NewInstance
Create a new SFBFileSystem instance.
[ public, static ]
SFBFileSystemSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBFileSystemSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBFileSystem::Rename
Rename an existing file to a new location, which must not already exist. Renaming a directory is not supported.
[ public ]
SFCError Rename(
    ACharConstPtr oldpath   // the existing path 
    ACharConstPtr newpath   // the desired path
);
[ public ]
SFCError Rename(
    SFXAnsiStringConstRef oldpath   // the existing path 
    SFXAnsiStringConstRef newpath   // the desired path
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

Common error codes:

  • Either oldpath or newpath is empty
  • AEEFS_EFILENOEXISTS: old path does not exist
  • AEEFS_EDIREXISTS: old path is a directory

Reference

BREW API IFileSystem_Rename


SFBFileSystem::RmDir
The IFileSystem_RmDir() removes an existing, but empty, directory.
[ public ]
SFCError RmDir(
    ACharConstPtr path   // the path to the existing directory 
);
[ public ]
SInt32 RmDir(
    SFXAnsiStringConstRef path   // the path to the existing directory 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

Common error codes:

  • AEE_EBADPARM: "pszPath" is empty
  • AEEFS_EDIRNOTEMPTY: directory is not empty AEEFS_EDIRNOEXISTS, AEEFS_EFILENOEXISTS,
  • AEEFS_EINVALIDOPERATION: Any one error code from the 3 listed if the directory does not exist.

Reference

BREW API IFileSystem_RmDir


SFBFileSystem::Stat
The IFileSystem_Stat() obtains information about a file or directory.
[ public ]
SFCError Stat(
    ACharConstPtr path   // the path to the file or directory of interest 
    FSStat * buf         // pointer to a struct FSStat, which is to be filled in 
    SInt32 size          // the size of buf
);
[ public ]
SInt32 Stat(
    SFXAnsiStringConstRef path   // the path to the file or directory of interest 
    FSStat * buf                 // pointer to a struct FSStat, which is to be filled in 
    SInt32 size                  // the size of buf
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

Common error codes:

  • AEE_EBADPARM: path is empty
  • AEEFS_EDIRNOEXISTS, AEEFS_EFILENOEXISTS, AEEFS_EINVALIDOPERATION: Any one error code from the 3 listed if the filesystem entity (file or directory) does not exist.

Reference

BREW API IFileSystem_Stat


SFBFileSystem::StatVFS
The IFileSystem_StatVFS() obtains information about the virtual file system that contains the pszPath argument.
[ public ]
SFCError StatVFS(
    ACharConstPtr path   // the path to the file or directory of interest 
    FSStatVFS * buf      // pointer to a struct FSStatVFS, which is to be filled in 
    SInt32 size          // the size of buf 
);
[ public ]
SInt32 StatVFS(
    SFXAnsiStringConstRef path   // the path to the file or directory of interest 
    FSStatVFS * buf              // pointer to a struct FSStatVFS, which is to be filled in 
    SInt32 size                  // the size of buf 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a specific error code.

Description

Common error codes:

  • AEE_EBADPARM: "pszPath" is empty
  • AEEFS_EDIRNOEXISTS, AEEFS_EFILENOEXISTS, AEEFS_EINVALIDOPERATION: Any one error code from the 3 listed if the filesystem entity (file or directory) does not exist.

Reference

BREW API IFileSystem_StatVFS


SFBFileSystem::Truncate
Truncate a file to the specified length.
[ public ]
SFCError Truncate(
    ACharConstPtr path   // the path to the file of interest 
    SInt32 length        // the new length for the file 
);
[ public ]
SFCError Truncate(
    SFXAnsiStringConstRef path   // the path to the file of interest 
    SInt32 length                // the new length for the file 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

一般的なエラーコード:

  • AEE_EBADPARM: Path is empty
  • AEEFS_EFILENOEXISTS, AEEFS_EINVALIDOPERATION: Any one error code from the 2 listed if the file does not exist.

Reference

BREW API IFileSystem_Truncate


SFBFileSystem::Unlink
Remove a file from a directory.
[ public ]
SFCError Unlink(
    ACharConstPtr path   // the path to the file of interest 
);
[ public ]
SFCError Unlink(
    SFXAnsiStringConstRef path   // the path to the file of interest 
);

Return value

Returns AEE_SUCCESS if the operation was successful. Otherwise returns a more specific error code.

Description

一般的なエラーコード:

  • AEE_EBADPARM: Path is empty
  • AEEFS_EFILENOEXISTS, AEEFS_EINVALIDOPERATION: Any one error code from the 2 listed if the file does not exist

Reference

BREW API IFileSystem_Unlink