1
0

filereaderapi.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include <precomp.h>
  2. #include "filereaderapi.h"
  3. #include <api/filereader/local/fileread.h>
  4. api_fileReader *fileApi = NULL;
  5. FileReaderApi::FileReaderApi() {
  6. }
  7. FileReaderApi::~FileReaderApi() {
  8. }
  9. void *FileReaderApi::fileOpen(const wchar_t *filename, const wchar_t *mode) {
  10. return FileReaders::open(filename, mode);
  11. }
  12. void FileReaderApi::fileClose(void *fileHandle) {
  13. FileReaders::close(fileHandle);
  14. }
  15. size_t FileReaderApi::fileRead(void *buffer, size_t size, void *fileHandle) {
  16. return FileReaders::read(buffer, size, fileHandle);
  17. }
  18. int FileReaderApi::fileWrite(const void *buffer, int size, void *fileHandle) {
  19. return FileReaders::write(buffer, size, fileHandle);
  20. }
  21. int FileReaderApi::fileSeek(int64_t offset, int origin, void *fileHandle) {
  22. return FileReaders::seek(offset, origin, fileHandle);
  23. }
  24. uint64_t FileReaderApi::fileTell(void *fileHandle) {
  25. return FileReaders::tell(fileHandle);
  26. }
  27. uint64_t FileReaderApi::fileGetFileSize(void *fileHandle) {
  28. return FileReaders::getFileSize(fileHandle);
  29. }
  30. int FileReaderApi::fileRemove(const wchar_t *filename) {
  31. return FileReaders::remove(filename);
  32. }
  33. int FileReaderApi::fileRemoveUndoable(const wchar_t *filename) {
  34. return FileReaders::removeUndoable(filename);
  35. }
  36. int FileReaderApi::fileMove(const wchar_t *filename, const wchar_t *destfilename) {
  37. return FileReaders::move(filename, destfilename);
  38. }