Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnSDUtils.h
- Revision:
- 27:efc4d654b139
- Parent:
- 25:57b2627fe756
- Child:
- 38:9070c17536cd
--- a/SnSDUtils.h Tue Oct 30 06:02:32 2012 +0000 +++ b/SnSDUtils.h Thu Nov 01 07:00:17 2012 +0000 @@ -35,9 +35,19 @@ const char* GetOutFileName(const uint64_t macadr, const uint32_t run, const uint16_t seq); - public: + + static + void DeleteAllFiles(const char* dirname=kSDsubDir); + + static + void DeleteFilesOfRun(const uint32_t run); + static void DeleteFile(FILE*& f, const char* fname); + + static + void DeleteDirIfEmpty(const char* dirname); + private: static char fgCurFileName[kFNBufSize]; static FILE* fgCurFile; @@ -193,7 +203,17 @@ class SnSDUtilsWhisperer { static void DeleteFile(FILE*& f, const char* fname) { - return SnSDUtils::DeleteFile(f, fname); + SnSDUtils::DeleteFile(f, fname); + } + + static + void DeleteAllFiles(const char* dirname=SnSDUtils::kSDsubDir) { + SnSDUtils::DeleteAllFiles(dirname); + } + + static + void DeleteFilesOfRun(const uint32_t run) { + SnSDUtils::DeleteFilesOfRun(run); } friend class SnCommWin; // the one who's allowed to use me