theCore C++ embedded framework
ecl::fat::dir Class Reference

FATFS directory descriptor. More...

#include </home/travis/build/forGGe/theCore/lib/fs/fat/export/ecl/fat/dir.hpp>

Inheritance diagram for ecl::fat::dir:
Collaboration diagram for ecl::fat::dir:

Public Member Functions

 dir (const fs::inode_ptr &node, FATFS *fs, const allocator &alloc, const DIR &fat_dir, fs::path_ptr path)
 Constructs and opens dir descriptor. More...
 
virtual ~dir ()
 Closes and destructs dir descriptor. More...
 
virtual fs::inode_ptr read () override
 Advances to the next item in the directory and gets current entity. More...
 
virtual ecl::err rewind () override
 Rewindes to the start of the directory. More...
 
virtual ecl::err close () override
 Closes a descriptor. More...
 
diroperator= (dir &)=delete
 
 dir (const dir &)=delete
 
- Public Member Functions inherited from ecl::fs::dir_descriptor
 dir_descriptor (const inode_weak &node)
 Constructs and opens directory descriptor from corresponding inode. More...
 
virtual ~dir_descriptor ()
 Closes and destructs dir descriptor. More...
 

Additional Inherited Members

- Protected Attributes inherited from ecl::fs::dir_descriptor
inode_ptr m_inode
 Associated inode. More...
 

Detailed Description

FATFS directory descriptor.

Constructor & Destructor Documentation

◆ dir() [1/2]

ecl::fat::dir::dir ( const fs::inode_ptr node,
FATFS *  fs,
const allocator alloc,
const DIR &  fat_dir,
fs::path_ptr  path 
)

Constructs and opens dir descriptor.

Parameters
[in]nodeinode for directory.
[in]fsPetite filesystem object.
[in]allocAllocator used for the filesystem.
[in]fat_dirPetiteFAT directory structure.
[in]pathDirectory path.

◆ ~dir()

ecl::fat::dir::~dir ( )
virtual

Closes and destructs dir descriptor.

◆ dir() [2/2]

ecl::fat::dir::dir ( const dir )
delete

Member Function Documentation

◆ read()

fs::inode_ptr ecl::fat::dir::read ( )
overridevirtual

Advances to the next item in the directory and gets current entity.

The entity could be a directory or a file from current directory, represented by this directory descriptor.

Precondition
Opened descriptor.
Returns
Next item in the directory, or nullptr if no more items.

Implements ecl::fs::dir_descriptor.

◆ rewind()

ecl::err ecl::fat::dir::rewind ( )
overridevirtual

Rewindes to the start of the directory.

Precondition
Opened descriptor.
Return values
Statusof operation.

Implements ecl::fs::dir_descriptor.

◆ close()

ecl::err ecl::fat::dir::close ( )
overridevirtual

Closes a descriptor.

Precondition
Opened descriptor.
Return values
Statusof operation.

Implements ecl::fs::dir_descriptor.

◆ operator=()

dir& ecl::fat::dir::operator= ( dir )
delete

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