POSIX File-system related functionality.  
 More...
#include <vfs.h>
 | 
| virtual cxx::Ref_ptr< File >  | get_file (int fd) noexcept=0 | 
|   | Get the L4Re::Vfs::File for the file descriptor fd.  
  | 
| 
virtual cxx::Ref_ptr< File >  | get_root () noexcept=0 | 
|   | Get the directory object for the application's root directory. 
  | 
| 
virtual cxx::Ref_ptr< File >  | get_cwd () noexcept | 
|   | Get the directory object for the application's current working directory. 
  | 
| 
virtual void  | set_cwd (cxx::Ref_ptr< File > const &) noexcept | 
|   | Set the current working directory for the application. 
  | 
| virtual int  | alloc_fd (cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0 | 
|   | Allocate the next free file descriptor.  
  | 
| virtual cxx::Pair< cxx::Ref_ptr< File >, int >  | set_fd (int fd, cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0 | 
|   | Set the file object referenced by the file descriptor fd.  
  | 
| virtual cxx::Ref_ptr< File >  | free_fd (int fd) noexcept=0 | 
|   | Free the file descriptor fd.  
  | 
| virtual int  | mount (char const *path, cxx::Ref_ptr< File > const &dir) noexcept=0 | 
|   | Mount a given file object at the given global path in the VFS.  
  | 
| 
int  | mount (char const *source, char const *target, char const *fstype, unsigned long mountflags, void const *data) noexcept | 
|   | Backend for the POSIX mount call. 
  | 
POSIX File-system related functionality. 
- Note
 - This class usually exists as a singleton and as a superclass of L4Re::Vfs::Ops (
 
- See also
 - L4Re::Vfs::vfs_ops). 
 
Definition at line 946 of file vfs.h.
 
◆ alloc_fd()
Allocate the next free file descriptor. 
- Parameters
 - 
  
    | f | The file to assign to that file descriptor.  | 
  
   
- Returns
 - The allocated file descriptor, or -EMFILE on error. 
 
 
 
◆ free_fd()
Free the file descriptor fd. 
- Parameters
 - 
  
    | fd | The file descriptor to free.  | 
  
   
- Returns
 - A pointer to the file object that was assigned to the fd. 
 
 
 
◆ get_file()
Get the L4Re::Vfs::File for the file descriptor fd. 
- Parameters
 - 
  
    | fd | The POSIX file descriptor number.  | 
  
   
- Returns
 - A pointer to the File object, or 0 if fd is not open. 
 
 
 
◆ mount()
  
  
      
        
          | virtual int L4Re::Vfs::Fs::mount  | 
          ( | 
          char const * |           path,  | 
         
        
           | 
           | 
          cxx::Ref_ptr< File > const & |           dir ) | 
         
       
   | 
  
pure virtualnoexcept   | 
  
 
Mount a given file object at the given global path in the VFS. 
- Parameters
 - 
  
    | path | The global path to mount dir at.  | 
    | dir | A pointer to the file/directory object that shall be mounted at path.  | 
  
   
- Returns
 - 0 on success, or <0 on error. 
 
References mount().
Referenced by mount(), and mount().
 
 
◆ set_fd()
Set the file object referenced by the file descriptor fd. 
- Parameters
 - 
  
    | fd | The file descriptor to set to f.  | 
    | f | The file object to assign.  | 
  
   
- Returns
 - A pair of a pointer to the file object that was previously assigned to fd (first) and a return value (second). second contains -#EBADF if the passed file descriptor is outside the valid range. first contains a Nil pointer in that case. On success, second contains 0. 
 
 
 
The documentation for this class was generated from the following files: