Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: cpp/stdio.cpp
- Revision:
- 1:62685faffa05
- Parent:
- 0:fd0d7bdfcdc2
- Child:
- 2:143cac498751
--- a/cpp/stdio.cpp Tue Nov 20 17:24:08 2012 +0000 +++ b/cpp/stdio.cpp Thu Nov 29 15:41:14 2012 +0000 @@ -274,10 +274,11 @@ namespace std { extern "C" int remove(const char *path) { - FileSystemLike *fs = FilePath::getFileSystem(path); + FilePath fp(path); + FileSystemLike *fs = fp.fileSystem(); if (fs == NULL) return -1; - return fs->remove(path); + return fs->remove(fp.fileName()); } extern "C" int rename(const char *oldname, const char *newname) { @@ -305,10 +306,11 @@ return FileSystemLike::opendir(); } - FileSystemLike *fs = FilePath::getFileSystem(path); + FilePath fp(path); + FileSystemLike* fs = fp.fileSystem(); if (fs == NULL) return NULL; - return fs->opendir(path); + return fs->opendir(fp.fileName()); } extern "C" struct dirent *readdir(DIR *dir) { @@ -332,10 +334,11 @@ } extern "C" int mkdir(const char *path, mode_t mode) { - FileSystemLike *fs = FilePath::getFileSystem(path); + FilePath fp(path); + FileSystemLike *fs = fp.fileSystem(); if (fs == NULL) return -1; - return fs->mkdir(path, mode); + return fs->mkdir(fp.fileName(), mode); } #if defined(TOOLCHAIN_GCC_CR) || defined(TOOLCHAIN_GCC_CS) || defined(TOOLCHAIN_GCC_ARM)