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.
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed
file_manager.hpp@1:58d2021e301d, 2016-12-05 (annotated)
- Committer:
- micbio
- Date:
- Mon Dec 05 01:07:30 2016 +0000
- Revision:
- 1:58d2021e301d
- Child:
- 2:e699312248f3
aa
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| micbio | 1:58d2021e301d | 1 | #include "mbed.h" |
| micbio | 1:58d2021e301d | 2 | #include <string> |
| micbio | 1:58d2021e301d | 3 | |
| micbio | 1:58d2021e301d | 4 | class file_manager |
| micbio | 1:58d2021e301d | 5 | { |
| micbio | 1:58d2021e301d | 6 | private: |
| micbio | 1:58d2021e301d | 7 | FILE *fp; |
| micbio | 1:58d2021e301d | 8 | string current_path; |
| micbio | 1:58d2021e301d | 9 | string path_sisk; |
| micbio | 1:58d2021e301d | 10 | string path_agh; |
| micbio | 1:58d2021e301d | 11 | string path_krk; |
| micbio | 1:58d2021e301d | 12 | |
| micbio | 1:58d2021e301d | 13 | void print_files(void); |
| micbio | 1:58d2021e301d | 14 | void get_string(void); |
| micbio | 1:58d2021e301d | 15 | bool open_file(char option); |
| micbio | 1:58d2021e301d | 16 | bool close_file(void); |
| micbio | 1:58d2021e301d | 17 | public: |
| micbio | 1:58d2021e301d | 18 | file_manager(void) : |
| micbio | 1:58d2021e301d | 19 | current_path(this->path_sisk) |
| micbio | 1:58d2021e301d | 20 | { |
| micbio | 1:58d2021e301d | 21 | path_sisk = "/sisk.txt"; |
| micbio | 1:58d2021e301d | 22 | path_agh = "/agh.txt"; |
| micbio | 1:58d2021e301d | 23 | path_krk = "/krakow.txt"; |
| micbio | 1:58d2021e301d | 24 | } |
| micbio | 1:58d2021e301d | 25 | |
| micbio | 1:58d2021e301d | 26 | void get_path(void); |
| micbio | 1:58d2021e301d | 27 | void set_path(void); |
| micbio | 1:58d2021e301d | 28 | void write_to_file(void); |
| micbio | 1:58d2021e301d | 29 | void append_to_file(void); |
| micbio | 1:58d2021e301d | 30 | void read_file(void); |
| micbio | 1:58d2021e301d | 31 | }; |