Miosix
2.0alpha1
|
#include <file.h>
Public Member Functions | |
FilesystemBase () | |
virtual int | open (intrusive_ref_ptr< FileBase > &file, StringPart &name, int flags, int mode)=0 |
virtual int | lstat (StringPart &name, struct stat *pstat)=0 |
virtual int | unlink (StringPart &name)=0 |
virtual int | rename (StringPart &oldName, StringPart &newName)=0 |
virtual int | mkdir (StringPart &name, int mode)=0 |
virtual int | rmdir (StringPart &name)=0 |
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< FilesystemBase > | shared_from_this () |
intrusive_ref_ptr< const FilesystemBase > | shared_from_this () const |
virtual | ~IntrusiveRefCountedSharedFromThis () |
Protected Attributes | |
const short int | filesystemId |
The unique filesystem id, used by lstat. | |
int | parentFsMountpointInode |
The inode of the directory in the parent fs. | |
Additional Inherited Members | |
Protected Member Functions inherited from miosix::IntrusiveRefCounted | |
IntrusiveRefCounted () | |
IntrusiveRefCounted (const IntrusiveRefCounted &) | |
IntrusiveRefCounted & | operator= (const IntrusiveRefCounted &) |
All filesystems derive from this class. Classes of this type are reference counted, must be allocated on the heap and managed through intrusive_ref_ptr<FilesystemBase>
miosix::FilesystemBase::FilesystemBase | ( | ) |
Constructor
|
virtual |
Destructor
|
inline |
|
pure virtual |
Obtain information on a file, identified by a path name. Does not follow symlinks
name | path name, relative to the local filesystem |
pstat | file information is stored here |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.
|
pure virtual |
Create a directory
name | directory name |
mode | directory permissions |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.
|
pure virtual |
Open a file
file | the file object will be stored here, if the call succeeds |
name | the name of the file to open, relative to the local filesystem |
flags | file flags (open for reading, writing, ...) |
mode | file permissions |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.
|
virtual |
Follows a symbolic link
path | path identifying a symlink, relative to the local filesystem |
target | the link target is returned here if the call succeeds. Note that the returned path is not relative to this filesystem, and can be either relative or absolute. |
|
pure virtual |
Rename a file or directory
oldName | old file name |
newName | new file name |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.
|
pure virtual |
Remove a directory if empty
name | directory name |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.
|
virtual |
|
pure virtual |
Remove a file or directory
name | path name of file or directory to remove |
Implemented in miosix::MountpointFs, and miosix::Fat32Fs.