MOS Source Code
Loading...
Searching...
No Matches
File Struct Referencefinal

#include <vfs_types.hpp>

+ Inheritance diagram for File:
+ Collaboration diagram for File:

Public Member Functions

 File (IOFlags flags, dentry_t *dentry)
 
 ~File ()=default
 
size_t on_read (void *buf, size_t size) override
 
size_t on_write (const void *buf, size_t size) override
 
void on_closed () override
 
off_t on_seek (off_t offset, io_seek_whence_t whence) override
 
bool on_mmap (vmap_t *vmap, off_t offset) override
 
bool on_munmap (vmap_t *vmap, bool *unmapped) override
 
- Public Member Functions inherited from BasicFile
 ~BasicFile ()=default
 
 BasicFile (IOFlags flags, io_type_t type, dentry_t *dentry)
 
mos::string name () const override
 
const file_ops_tget_ops () const
 
- Public Member Functions inherited from IO
 IO (IOFlags flags, io_type_t type)
 
virtual ~IO ()=0
 
IOref ()
 
IOunref ()
 
virtual off_t seek (off_t, io_seek_whence_t) final
 
virtual off_t tell () final
 
virtual size_t read (void *buf, size_t count) final
 
virtual size_t pread (void *buf, size_t count, off_t offset) final
 
virtual size_t write (const void *buf, size_t count) final
 
virtual bool VerifyMMapPermissions (VMFlags flags, bool is_private) final
 
bool map (vmap_t *vmap, off_t offset)
 
bool unmap (vmap_t *vmap, bool *unmapped)
 

Additional Inherited Members

- Static Public Member Functions inherited from IO
static bool IsValid (const IO *io)
 
- Public Attributes inherited from BasicFile
dentry_tdentry
 
spinlock_t offset_lock
 
size_t offset
 
voidprivate_data
 
- Public Attributes inherited from IO
const IOFlags io_flags = IO_NONE
 
const io_type_t io_type = IO_NULL
 
- Static Public Attributes inherited from NamedType<"File">
static constexpr mos::string_view type_name
 

Detailed Description

Definition at line 237 of file vfs_types.hpp.

Constructor & Destructor Documentation

◆ File()

File ( IOFlags flags,
dentry_t * dentry )
inline

Definition at line 239 of file vfs_types.hpp.

+ Here is the call graph for this function:

◆ ~File()

~File ( )
default

Member Function Documentation

◆ on_read()

size_t on_read ( void * buf,
size_t size )
overridevirtual

Reimplemented from IO.

Definition at line 120 of file vfs.cpp.

+ Here is the call graph for this function:

◆ on_write()

size_t on_write ( const void * buf,
size_t size )
overridevirtual

Reimplemented from IO.

Definition at line 136 of file vfs.cpp.

+ Here is the call graph for this function:

◆ on_closed()

void on_closed ( )
overridevirtual

Implements IO.

Definition at line 62 of file vfs.cpp.

+ Here is the call graph for this function:

◆ on_seek()

off_t on_seek ( off_t offset,
io_seek_whence_t whence )
overridevirtual

Reimplemented from IO.

Definition at line 150 of file vfs.cpp.

+ Here is the call graph for this function:

◆ on_mmap()

bool on_mmap ( vmap_t * vmap,
off_t offset )
overridevirtual

Reimplemented from IO.

Definition at line 237 of file vfs.cpp.

+ Here is the call graph for this function:

◆ on_munmap()

bool on_munmap ( vmap_t * vmap,
bool * unmapped )
overridevirtual

Reimplemented from IO.

Definition at line 250 of file vfs.cpp.

+ Here is the call graph for this function:

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