@FileSizeGetter.h 875 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class FileSizeGetter
  4. {
  5. class Elm
  6. {
  7. UID id;
  8. uint file_size;
  9. };
  10. Memc<Elm> elms;
  11. // get
  12. bool created()C;
  13. bool busy ();
  14. bool get ();
  15. // manage
  16. void clear();
  17. void stop ();
  18. void del ();
  19. void get(C Str &path);
  20. ~FileSizeGetter();
  21. private:
  22. Str path;
  23. Memc<Elm> elms_thread;
  24. SyncLock lock;
  25. Thread thread;
  26. void cleanup();
  27. static bool Func(Thread &thread);
  28. bool func();
  29. };
  30. /******************************************************************************/
  31. /******************************************************************************/
  32. /******************************************************************************/