Miosix  2.0alpha1
miosix::MountpointFs Class Reference

#include <mountpointfs.h>

Inheritance diagram for miosix::MountpointFs:
Collaboration diagram for miosix::MountpointFs:

Public Member Functions

 MountpointFs ()
 
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)
 
- 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

MountpointFs is a special filesystem whose purpose is to create directories to be used as mountpoints for other filesystems.

Constructor & Destructor Documentation

miosix::MountpointFs::MountpointFs ( )
inline

Constructor

Member Function Documentation

int miosix::MountpointFs::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::MountpointFs::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.

int miosix::MountpointFs::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::MountpointFs::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::MountpointFs::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::MountpointFs::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: