Mbed OS Reference
Loading...
Searching...
No Matches
FilePath.h
1/* mbed Microcontroller Library
2 * Copyright (c) 2006-2019 ARM Limited
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17#ifndef MBED_FILEPATH_H
18#define MBED_FILEPATH_H
19
20#include "platform/platform.h"
21
22#include "platform/FileSystemLike.h"
23#include "platform/FileLike.h"
24
25namespace mbed {
26
27class FileSystem;
28
29/**
30 * \defgroup platform_FilePath FilePath class
31 * \ingroup platform-public-api-file
32 * @{
33 */
34
35/** Class FilePath
36 *
37 */
38class FilePath {
39public:
40 /** Constructor FilePath
41 *
42 * @param file_path The path of file.
43 */
44 FilePath(const char *file_path);
45
46 const char *fileName(void);
47
48 bool isFileSystem(void);
49 FileSystemLike *fileSystem(void);
50
51 bool isFile(void);
52 FileLike *file(void);
53 bool exists(void);
54
55private:
56 const char *file_name;
57 FileBase *fb;
58};
59
60/**@}*/
61
62} // namespace mbed
63
64#endif
Class FileBase.
Definition: FileBase.h:48
Class FileLike.
Definition: FileLike.h:38
Class FilePath.
Definition: FilePath.h:38
FilePath(const char *file_path)
Constructor FilePath.
A filesystem-like object is one that can be used to open file-like objects though it by fopen("/name/...