FileInMemorySet.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _FileInMemorySet_h_
  2. #define _FileInMemorySet_h_
  3. /* FileInMemorySet.h
  4. *
  5. * Copyright (C) 2011-2017 David Weenink, 2015 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "FileInMemory.h"
  21. #include "Collection.h"
  22. #include "Strings_.h"
  23. #include "FileInMemorySet_def.h"
  24. autoFileInMemorySet FileInMemorySet_create ();
  25. autoFileInMemorySet FileInMemorySet_createFromDirectoryContents (conststring32 dirpath, conststring32 file);
  26. autoFileInMemorySet FilesInMemory_to_FileInMemorySet (OrderedOf<structFileInMemory>& list);
  27. autoFileInMemorySet FileInMemorySet_extractFiles (FileInMemorySet me, kMelder_string which, conststring32 criterion);
  28. /* Only creates references to files in memory. Once me is deleted, the references are not valid any more!! */
  29. autoFileInMemorySet FileInMemorySet_listFiles (FileInMemorySet me, kMelder_string which, conststring32 criterion);
  30. integer FileInMemorySet_getTotalNumberOfBytes (FileInMemorySet me);
  31. autoFileInMemorySet FileInMemorySets_merge (OrderedOf<structFileInMemorySet>& list);
  32. void FileInMemorySet_showAsCode (FileInMemorySet me, conststring32 name, integer numberOfBytesPerLine);
  33. void FileInMemorySet_showOneFileAsCode (FileInMemorySet me, integer index, conststring32 name, integer numberOfBytesPerLine);
  34. char * FileInMemorySet_getCopyOfData (FileInMemorySet me, conststring32 id, integer *numberOfBytes);
  35. const char * FileInMemorySet_getData (FileInMemorySet me, conststring32 id, integer *numberOfBytes);
  36. integer FileInMemorySet_findNumberOfMatches_path (FileInMemorySet me, kMelder_string which, conststring32 criterion);
  37. integer FileInMemorySet_getIndexFromId (FileInMemorySet me, conststring32 id);
  38. integer FileInMemorySet_lookUp (FileInMemorySet me, conststring32 path);
  39. bool FileInMemorySet_hasDirectory (FileInMemorySet me, conststring32 name);
  40. autoStrings FileInMemorySet_to_Strings_id (FileInMemorySet me);
  41. #endif // _FileInMemorySet_h_