mbed libraries for KL25Z
Diff: DirHandle.h
- Revision:
- 8:c14af7958ef5
- Parent:
- 0:8024c367e29f
- Child:
- 9:663789d7729f
--- a/DirHandle.h Tue Oct 23 09:20:18 2012 +0000 +++ b/DirHandle.h Fri Nov 09 11:33:53 2012 +0000 @@ -1,7 +1,6 @@ /* mbed Microcontroller Library - DirHandler * Copyright (c) 2008-2009 ARM Limited. All rights reserved. - */ - + */ #ifndef MBED_DIRHANDLE_H #define MBED_DIRHANDLE_H @@ -19,14 +18,13 @@ namespace mbed { -/* Class DirHandle - * Represents a directory stream. Objects of this type are returned +/** 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") + * 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 @@ -35,48 +33,44 @@ */ class DirHandle { - public: - /* Function closedir - * Closes the directory. +public: + /** Closes the directory. * - * Variables - * returns - 0 on success, or -1 on error. + * @returns + * 0 on success, + * -1 on error. */ virtual int closedir()=0; - - /* Function readdir - * Return the directory entry at the current position, and + + /** Return the directory entry at the current position, and * advances the position to the next entry. * - * Returns + * @returns * A pointer to a dirent structure representing the * directory entry at the current position, or NULL on reaching * end of directory or error. */ virtual struct dirent *readdir()=0; - /* Function rewinddir - * Resets the position to the beginning of the directory. + /** Resets the position to the beginning of the directory. */ virtual void rewinddir()=0; - /* Function telldir - * Returns the current position of the DirHandle. + /** Returns the current position of the DirHandle. * - * Returns - * The current position, or -1 on error. + * @returns + * the current position, + * -1 on error. */ virtual off_t telldir() { return -1; } - /* Function seekdir - * Sets the position of the DirHandle. + /** Sets the position of the DirHandle. * - * Variables - * location - The location to seek to. Must be a value returned - * by telldir. + * @param location The location to seek to. Must be a value returned by telldir. */ virtual void seekdir(off_t location) { } - + + virtual ~DirHandle() {} }; } // namespace mbed