Miosix  2.0alpha1
miosix::Fat32Fs Class Reference

#include <fat32.h>

Inheritance diagram for miosix::Fat32Fs:
Collaboration diagram for miosix::Fat32Fs:

Public Member Functions

 Fat32Fs (intrusive_ref_ptr< FileBase > disk)
 
virtual int open (intrusive_ref_ptr< FileBase > &file, StringPart &name, int flags, int mode)
 
virtual int lstat (StringPart &name, struct stat *pstat)
 
virtual int unlink (StringPart &name)
 
virtual int rename (StringPart &oldName, StringPart &newName)
 
virtual int mkdir (StringPart &name, int mode)
 
virtual int rmdir (StringPart &name)
 
bool mountFailed () const
 
 ~Fat32Fs ()
 
- Public Member Functions inherited from miosix::FilesystemBase
 FilesystemBase ()
 
virtual int readlink (StringPart &name, std::string &target)
 
virtual bool supportsSymlinks () const
 
short int getFsId () const
 
virtual ~FilesystemBase ()
 
- Public Member Functions inherited from miosix::IntrusiveRefCountedSharedFromThis< FilesystemBase >
 IntrusiveRefCountedSharedFromThis ()
 
intrusive_ref_ptr< FilesystemBaseshared_from_this ()
 
intrusive_ref_ptr< const
FilesystemBase
shared_from_this () const
 
virtual ~IntrusiveRefCountedSharedFromThis ()
 

Additional Inherited Members

- Protected Member Functions inherited from miosix::IntrusiveRefCounted
 IntrusiveRefCounted ()
 
 IntrusiveRefCounted (const IntrusiveRefCounted &)
 
IntrusiveRefCountedoperator= (const IntrusiveRefCounted &)
 
- Protected Attributes inherited from miosix::FilesystemBase
const short int filesystemId
 The unique filesystem id, used by lstat.
 
int parentFsMountpointInode
 The inode of the directory in the parent fs.
 

Detailed Description

Fat32 Filesystem.

Constructor & Destructor Documentation

miosix::Fat32Fs::Fat32Fs ( intrusive_ref_ptr< FileBase disk)

Constructor

miosix::Fat32Fs::~Fat32Fs ( )

Destructor

Member Function Documentation

int miosix::Fat32Fs::lstat ( StringPart &  name,
struct stat *  pstat 
)
virtual

Obtain information on a file, identified by a path name. Does not follow symlinks

Parameters
namepath name, relative to the local filesystem
pstatfile information is stored here
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.

int miosix::Fat32Fs::mkdir ( StringPart &  name,
int  mode 
)
virtual

Create a directory

Parameters
namedirectory name
modedirectory permissions
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.

bool miosix::Fat32Fs::mountFailed ( ) const
inline
Returns
true if the filesystem failed to mount
int miosix::Fat32Fs::open ( intrusive_ref_ptr< FileBase > &  file,
StringPart &  name,
int  flags,
int  mode 
)
virtual

Open a file

Parameters
filethe file object will be stored here, if the call succeeds
namethe name of the file to open, relative to the local filesystem
flagsfile flags (open for reading, writing, ...)
modefile permissions
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.

int miosix::Fat32Fs::rename ( StringPart &  oldName,
StringPart &  newName 
)
virtual

Rename a file or directory

Parameters
oldNameold file name
newNamenew file name
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.

int miosix::Fat32Fs::rmdir ( StringPart &  name)
virtual

Remove a directory if empty

Parameters
namedirectory name
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.

int miosix::Fat32Fs::unlink ( StringPart &  name)
virtual

Remove a file or directory

Parameters
namepath name of file or directory to remove
Returns
0 on success, or a negative number on failure

Implements miosix::FilesystemBase.


The documentation for this class was generated from the following files: