Mistake on this page?
Report an issue in GitHub or email us
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 
25 namespace mbed {
26 
27 class FileSystem;
28 
29 /**
30  * \defgroup platform_FilePath FilePath class
31  * \ingroup platform-public-api-file
32  * @{
33  */
34 
35 /** Class FilePath
36  *
37  */
38 class FilePath {
39 public:
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 
55 private:
56  const char *file_name;
57  FileBase *fb;
58 };
59 
60 /**@}*/
61 
62 } // namespace mbed
63 
64 #endif
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/...
Class FilePath.
Definition: FilePath.h:38
Class FileLike.
Definition: FileLike.h:38
Class FileBase.
Definition: FileBase.h:48
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.