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.
mbed-os/platform/FilePath.h@0:4beb2ea291ec, 2020-03-16 (annotated)
- Committer:
- boro
- Date:
- Mon Mar 16 13:12:31 2020 +0000
- Revision:
- 0:4beb2ea291ec
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
boro | 0:4beb2ea291ec | 1 | /* mbed Microcontroller Library |
boro | 0:4beb2ea291ec | 2 | * Copyright (c) 2006-2013 ARM Limited |
boro | 0:4beb2ea291ec | 3 | * |
boro | 0:4beb2ea291ec | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
boro | 0:4beb2ea291ec | 5 | * you may not use this file except in compliance with the License. |
boro | 0:4beb2ea291ec | 6 | * You may obtain a copy of the License at |
boro | 0:4beb2ea291ec | 7 | * |
boro | 0:4beb2ea291ec | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
boro | 0:4beb2ea291ec | 9 | * |
boro | 0:4beb2ea291ec | 10 | * Unless required by applicable law or agreed to in writing, software |
boro | 0:4beb2ea291ec | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
boro | 0:4beb2ea291ec | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
boro | 0:4beb2ea291ec | 13 | * See the License for the specific language governing permissions and |
boro | 0:4beb2ea291ec | 14 | * limitations under the License. |
boro | 0:4beb2ea291ec | 15 | */ |
boro | 0:4beb2ea291ec | 16 | #ifndef MBED_FILEPATH_H |
boro | 0:4beb2ea291ec | 17 | #define MBED_FILEPATH_H |
boro | 0:4beb2ea291ec | 18 | |
boro | 0:4beb2ea291ec | 19 | #include "platform/platform.h" |
boro | 0:4beb2ea291ec | 20 | |
boro | 0:4beb2ea291ec | 21 | #include "platform/FileSystemLike.h" |
boro | 0:4beb2ea291ec | 22 | #include "platform/FileLike.h" |
boro | 0:4beb2ea291ec | 23 | |
boro | 0:4beb2ea291ec | 24 | namespace mbed { |
boro | 0:4beb2ea291ec | 25 | /** \addtogroup platform */ |
boro | 0:4beb2ea291ec | 26 | /** @{*/ |
boro | 0:4beb2ea291ec | 27 | /** |
boro | 0:4beb2ea291ec | 28 | * \defgroup platform_FilePath FilePath class |
boro | 0:4beb2ea291ec | 29 | * @{ |
boro | 0:4beb2ea291ec | 30 | */ |
boro | 0:4beb2ea291ec | 31 | |
boro | 0:4beb2ea291ec | 32 | class FileSystem; |
boro | 0:4beb2ea291ec | 33 | /** Class FilePath |
boro | 0:4beb2ea291ec | 34 | * |
boro | 0:4beb2ea291ec | 35 | */ |
boro | 0:4beb2ea291ec | 36 | |
boro | 0:4beb2ea291ec | 37 | class FilePath { |
boro | 0:4beb2ea291ec | 38 | public: |
boro | 0:4beb2ea291ec | 39 | /** Constructor FilePath |
boro | 0:4beb2ea291ec | 40 | * |
boro | 0:4beb2ea291ec | 41 | * @param file_path The path of file. |
boro | 0:4beb2ea291ec | 42 | */ |
boro | 0:4beb2ea291ec | 43 | FilePath(const char* file_path); |
boro | 0:4beb2ea291ec | 44 | |
boro | 0:4beb2ea291ec | 45 | const char* fileName(void); |
boro | 0:4beb2ea291ec | 46 | |
boro | 0:4beb2ea291ec | 47 | bool isFileSystem(void); |
boro | 0:4beb2ea291ec | 48 | FileSystemLike* fileSystem(void); |
boro | 0:4beb2ea291ec | 49 | |
boro | 0:4beb2ea291ec | 50 | bool isFile(void); |
boro | 0:4beb2ea291ec | 51 | FileLike* file(void); |
boro | 0:4beb2ea291ec | 52 | bool exists(void); |
boro | 0:4beb2ea291ec | 53 | |
boro | 0:4beb2ea291ec | 54 | private: |
boro | 0:4beb2ea291ec | 55 | const char* file_name; |
boro | 0:4beb2ea291ec | 56 | FileBase* fb; |
boro | 0:4beb2ea291ec | 57 | }; |
boro | 0:4beb2ea291ec | 58 | |
boro | 0:4beb2ea291ec | 59 | /**@}*/ |
boro | 0:4beb2ea291ec | 60 | |
boro | 0:4beb2ea291ec | 61 | /**@}*/ |
boro | 0:4beb2ea291ec | 62 | |
boro | 0:4beb2ea291ec | 63 | } // namespace mbed |
boro | 0:4beb2ea291ec | 64 | |
boro | 0:4beb2ea291ec | 65 | #endif |