This is the final version of Mini Gateway for Automation and Security desgined for Renesas GR Peach Design Contest

Dependencies:   GR-PEACH_video GraphicsFramework HTTPServer R_BSP mbed-rpc mbed-rtos Socket lwip-eth lwip-sys lwip FATFileSystem

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

DirHandle Class Reference

Represents a directory stream. More...

#include <DirHandle.h>

Inherited by BaseDirHandle, and LocalDirHandle.

Public Member Functions

virtual int closedir ()=0
 Closes the directory.
virtual struct dirent * readdir ()=0
 Return the directory entry at the current position, and advances the position to the next entry.
virtual void rewinddir ()=0
 Resets the position to the beginning of the directory.
virtual off_t telldir ()
 Returns the current position of the DirHandle.
virtual void seekdir (off_t location)
 Sets the position of the DirHandle.

Protected Member Functions

virtual void lock ()
 Acquire exclusive access to this object.
virtual void unlock ()
 Release exclusive access to this object.

Detailed Description

Represents a directory stream.

Objects of this type are returned by a FileSystemLike's opendir method. Implementations must define at least closedir, readdir and rewinddir.

If a FileSystemLike class defines the opendir method, then the directories of an object of that type can be accessed by DIR *d = opendir("/example/directory") (or opendir("/example") to open the root of the filesystem), and then using readdir(d) etc.

The root directory is considered to contain all FileLike and FileSystemLike objects, so the DIR* returned by opendir("/") will reflect this.

Synchronization level: Set by subclass

Definition at line 52 of file DirHandle.h.


Member Function Documentation

virtual int closedir (  ) [pure virtual]

Closes the directory.

Returns:
0 on success, -1 on error.