Commit Graph

37 Commits

Author SHA1 Message Date
notpike e00d91e1d2 Added return codes for delete_file() and rename_file() for file.hpp 2022-02-01 10:37:38 -08:00
furrtek 441a266dc4 Added back scanning in BHT TX
Added file creation date display in File Manager
2018-01-09 21:12:19 +00:00
furrtek 1b93dd53e8 Tone generator class 2017-11-10 00:25:04 +00:00
furrtek 37ce81383d Added file manager 2017-09-19 20:14:56 +01:00
furrtek 5ce1b8fa60 File size + credits 2017-04-07 00:41:32 +01:00
furrtek 089eeeafe4 Tones bugfix, numbers station voice files search 2017-03-22 03:21:06 +00:00
furrtek 15f66eb74e Soundboard bugfix: shouldn't crash with long file names 2017-02-01 23:31:16 +00:00
furrtek 5e40669cbc Merge 'upstream/master' - At least it builds... 2017-01-16 03:45:44 +00:00
Jared Boone 431aae333a Move additional FR_* error values to file.hpp for public use. 2016-12-06 09:34:45 -08:00
Jared Boone aed58f2a3f File: Stop copying path when iterating.
TODO: I bet I've made this mistake a billion other places...
2016-10-01 10:47:21 -07:00
Jared Boone 86f672af2b File: Add misc useful API from C++17. 2016-10-01 10:44:11 -07:00
Jared Boone b87d1456a2 File: Make path a first-class object, add some methods from C++17. 2016-09-08 12:57:34 -07:00
Jared Boone f80706cb34 File: Extract function to convert path to string. 2016-09-07 22:20:51 -07:00
Jared Boone 79330015ed File: Clean up directory_iterator construction, preserve pattern.
FatFs requires pattern pointer to be stable during search.
2016-09-07 20:46:45 -07:00
furrtek 808f99647e Soundboard: Arbitrary samplerate support for wave files
Screenshots
2016-08-26 09:54:17 +02:00
furrtek f7e0f36bd9 Added Soundboard
file.cpp: scan_root_files
proc_audiotx.cpp: bandwidth setting
ui_widget.cpp: button on_focus
2016-08-26 08:11:24 +02:00
Jared Boone ed791ac5bd File: Widen size/offset types for 64-bit filesystems. 2016-08-21 22:15:19 -07:00
Jared Boone f7bfde73b6 FatFs: Enable long file name support.
Lots of re-plumbing to make this work, including a bunch of Unicode stuff now in the binary. Bloat City, I'm sure.

TODO: FatFs using unsigned (uint16_t) for UTF16 representation is kinda inconvenient. Lots of reinterpret_cast<>().
2016-08-21 18:06:39 -07:00
Jared Boone ffa797b926 File: Remove puts(), add write_line(), cascade changes in interface. 2016-07-24 20:39:21 -07:00
Jared Boone ff17f8f293 File: Do not use f_error() in puts(), it doesn't return the reason for failure.
TODO: Improve puts() behavior to return a more specific error than FR_EOF.
2016-07-24 19:13:39 -07:00
Jared Boone d556ef38b4 File: Make incomplete write()s return FR_DISK_FULL. 2016-07-24 19:12:37 -07:00
Jared Boone 682a1706a3 Improve File error handling. Massive effects...
API is somewhat stolen from Rust std::fs::File. Static factories didn't work out so well, though. Move semantics made my head explode.
TODO: Still a lot of places where errors aren't handled, but it's an improvement...
2016-05-16 14:01:44 -07:00
Jared Boone d905c446bf Fix integer width oops calculating disk space(). 2016-05-13 18:10:23 -07:00
Jared Boone 1df505331a Handle File errors beyond FatFs. 2016-05-12 21:55:01 -07:00
Jared Boone b21758781c Preserve File error state once error occurs. 2016-05-12 21:54:13 -07:00
Jared Boone 4567db2fdb Add std::filesystem::filesystem_error object.
Not a standards-compliant implementation, but has the same vague shape, so should be easier to port later(?).
2016-05-12 18:19:28 -07:00
Jared Boone f157c13442 Implement std::filesystem::space(). 2016-05-11 10:58:57 -07:00
Jared Boone 80f94cbc29 Add File seek support. 2016-05-01 11:29:44 -07:00
Jared Boone 0d6103916d Converge File object with std::fstream. Simplify LogFile.
LogFile no longer watches SD card presence and tries to open/close files dynamically.
2016-04-30 15:09:34 -07:00
Jared Boone 12b8a1b2a9 Change next-file naming functions to work on filename stems.
This paves the way for writing metadata files with similar prefixes, and avoids confusing numbering of capture files with different extensions (e.g. BAD_0000.S16 and BBD_0000.S8).
2016-04-29 11:27:12 -07:00
Jared Boone f49d04fe7a Functions to select next filename based on matching pattern.
Used for capture, audio, screenshot file naming.
2016-04-20 09:57:17 -07:00
Jared Boone 7492984144 Add filesystem directory enumeration.
Borrow API from std::filesystem -- Boost and C++17.
2016-04-20 09:56:35 -07:00
Jared Boone 0a9d7ec8d8 Add File::open_for_reading().
Barf.
2016-04-10 15:56:34 -07:00
Jared Boone 38ba02a68f Change File::open to File::open_for_writing.
Not thrilled about the File API right now...
2016-04-10 15:55:01 -07:00
Jared Boone 083711ceb2 Add File::open(), use inside File::open_for_append(). 2016-02-18 21:33:38 -08:00
Jared Boone 3172fb1ad6 Make assorted arguments pass-by-reference. 2016-02-06 16:23:20 -08:00
Jared Boone fc7a7d753d Extract general File class from LogFile. 2016-01-17 14:20:02 -08:00