21
21
#include " platform/FileSystemHandle.h"
22
22
#include " platform/FileHandle.h"
23
23
#include " platform/DirHandle.h"
24
- #include < errno.h>
25
24
26
25
namespace mbed {
27
26
/* * \addtogroup platform */
@@ -43,26 +42,9 @@ class FileSystemLike : public FileSystemHandle, public FileBase {
43
42
FileSystemLike (const char *name = NULL ) : FileBase(name, FileSystemPathType) {}
44
43
virtual ~FileSystemLike () {}
45
44
46
- /* * Open a file on the filesystem
47
- *
48
- * @param file Destination for the handle to a newly created file
49
- * @param path The name of the file to open
50
- * @param flags The flags to open the file in, one of O_RDONLY, O_WRONLY, O_RDWR,
51
- * bitwise or'd with one of O_CREAT, O_TRUNC, O_APPEND
52
- * @return 0 on success, negative error code on failure
53
- */
54
- virtual int open (FileHandle **file, const char *filename, int flags) = 0;
55
-
56
- /* * Open a directory on the filesystem
57
- *
58
- * @param dir Destination for the handle to the directory
59
- * @param path Name of the directory to open
60
- * @return 0 on success, negative error code on failure
61
- */
62
- virtual int open (DirHandle **dir, const char *path)
63
- {
64
- return -ENOSYS;
65
- }
45
+ // Inherited functions with name conflicts
46
+ using FileSystemHandle::open;
47
+ using FileSystemHandle::open;
66
48
67
49
/* * Open a file on the filesystem
68
50
*
@@ -74,7 +56,7 @@ class FileSystemLike : public FileSystemHandle, public FileBase {
74
56
*/
75
57
MBED_DEPRECATED_SINCE (" mbed-os-5.5" ,
76
58
" Replaced by `int open(FileHandle **, ...)` for propagating error codes" )
77
- virtual FileHandle *open (const char *path, int flags)
59
+ FileHandle *open (const char *path, int flags)
78
60
{
79
61
FileHandle *file;
80
62
int err = open (&file, path, flags);
@@ -89,7 +71,7 @@ class FileSystemLike : public FileSystemHandle, public FileBase {
89
71
*/
90
72
MBED_DEPRECATED_SINCE (" mbed-os-5.5" ,
91
73
" Replaced by `int open(DirHandle **, ...)` for propagating error codes" )
92
- virtual DirHandle *opendir (const char *path)
74
+ DirHandle *opendir (const char *path)
93
75
{
94
76
DirHandle *dir;
95
77
int err = open (&dir, path);
0 commit comments