17#ifndef MBED_LOCALFILESYSTEM_H
18#define MBED_LOCALFILESYSTEM_H
20#include "platform/platform.h"
22#if DOXYGEN_ONLY || (COMPONENT_LOCALFILESYSTEM && MBED_CONF_TARGET_SEMIHOSTING_ENABLED)
24#include "platform/FileSystemLike.h"
25#include "rtos/Mutex.h"
26#include "platform/NonCopyable.h"
36FILEHANDLE local_file_open(
const char *name,
int flags);
49 virtual ssize_t
write(
const void *buffer,
size_t length);
51 virtual ssize_t
read(
void *buffer,
size_t length);
55 virtual off_t
seek(off_t position,
int whence);
63 virtual void unlock();
117 virtual int remove(
const char *filename);
Represents a directory stream.
A filesystem-like object is one that can be used to open file-like objects though it by fopen("/name/...
virtual ssize_t write(const void *buffer, size_t length)
Write the contents of a buffer to a file.
virtual int close()
Close a file.
virtual off_t seek(off_t position, int whence)
Move the file position to a given offset from from a given location.
virtual ssize_t read(void *buffer, size_t length)
Read the contents of a file into a buffer.
virtual int isatty()
Check if the file in an interactive terminal device.
virtual int sync()
Flush any buffers associated with the file.
virtual off_t size()
Get the size of the file.
A filesystem for accessing the local mbed Microcontroller USB disk drive.
virtual int open(FileHandle **file, const char *path, int flags)
Open a file on the filesystem.
virtual int open(DirHandle **dir, const char *name)
Open a directory on the filesystem.
virtual int remove(const char *filename)
Remove a file from the filesystem.
Prevents generation of copy constructor and copy assignment operator in derived classes.
The Mutex class is used to synchronize the execution of threads.