Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem: Revert deprecation of FileHandle #3867

Merged
merged 4 commits into from
Mar 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions drivers/DirHandle.h

This file was deleted.

142 changes: 0 additions & 142 deletions drivers/FileHandle.h

This file was deleted.

3 changes: 2 additions & 1 deletion features/filesystem/Dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define DIR_H

#include "filesystem/FileSystem.h"
#include "platform/DirHandle.h"

namespace mbed {
/** \addtogroup filesystem */
Expand All @@ -26,7 +27,7 @@ namespace mbed {

/** Dir class
*/
class Dir {
class Dir : public DirHandle {
public:
/** Create an uninitialized directory
*
Expand Down
2 changes: 1 addition & 1 deletion features/filesystem/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ File::File()
}

File::File(FileSystem *fs, const char *path, int flags)
: FileLike(path), _fs(0), _file(0)
: _fs(0), _file(0)
{
open(fs, path, flags);
}
Expand Down
8 changes: 4 additions & 4 deletions features/filesystem/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define FILE_H

#include "filesystem/FileSystem.h"
#include "drivers/FileLike.h"
#include "platform/FileHandle.h"

namespace mbed {
/** \addtogroup filesystem */
Expand All @@ -27,7 +27,7 @@ namespace mbed {

/** File class
*/
class File : public FileLike {
class File : public FileHandle {
public:
/** Create an uninitialized file
*
Expand Down Expand Up @@ -75,15 +75,15 @@ class File : public FileLike {
* @return The number of bytes read, 0 at end of file, negative error on failure
*/

virtual ssize_t read(void *buffer, size_t len);
virtual ssize_t read(void *buffer, size_t size);

/** Write the contents of a buffer to a file
*
* @param buffer The buffer to write from
* @param size The number of bytes to write
* @return The number of bytes written, negative error on failure
*/
virtual ssize_t write(const void *buffer, size_t len);
virtual ssize_t write(const void *buffer, size_t size);

/** Flush any buffers associated with the file
*
Expand Down
6 changes: 3 additions & 3 deletions features/filesystem/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "platform/platform.h"

#include "drivers/FileBase.h"
#include "platform/FileBase.h"
#include "BlockDevice.h"

namespace mbed {
Expand Down Expand Up @@ -118,7 +118,7 @@ class FileSystem : public FileBase {
* @param size The number of bytes to read
* @return The number of bytes read, 0 at end of file, negative error on failure
*/
virtual ssize_t file_read(fs_file_t file, void *buffer, size_t len) = 0;
virtual ssize_t file_read(fs_file_t file, void *buffer, size_t size) = 0;

/** Write the contents of a buffer to a file
*
Expand All @@ -127,7 +127,7 @@ class FileSystem : public FileBase {
* @param size The number of bytes to write
* @return The number of bytes written, negative error on failure
*/
virtual ssize_t file_write(fs_file_t file, const void *buffer, size_t len) = 0;
virtual ssize_t file_write(fs_file_t file, const void *buffer, size_t size) = 0;

/** Flush any buffers associated with the file
*
Expand Down
2 changes: 1 addition & 1 deletion mbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
#include "drivers/LowPowerTimeout.h"
#include "drivers/LowPowerTicker.h"
#include "drivers/LowPowerTimer.h"
#include "drivers/LocalFileSystem.h"
#include "platform/LocalFileSystem.h"
#include "drivers/InterruptIn.h"
#include "platform/mbed_wait_api.h"
#include "hal/sleep_api.h"
Expand Down
Loading