TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kmfitest.cpp 662B

12345678910111213141516171819202122232425262728
  1. #include <stdio.h>
  2. #include <tqdir.h>
  3. #include <tqfile.h>
  4. #include <kinstance.h>
  5. #include <kurl.h>
  6. #include <tdefilemetainfo.h>
  7. #include <kmimetype.h>
  8. int main (int argc, char **argv)
  9. {
  10. TDEInstance ins("kmfitest");
  11. if (argc < 2) {
  12. printf("usage: %s <file>\n", argv[0]);
  13. return 1;
  14. }
  15. for (int i = 1; i < argc; i++) {
  16. TQString file = TQFile::decodeName(argv[i]);
  17. tqWarning("File: %s", file.local8Bit().data());
  18. KMimeType::Ptr p;
  19. p = KMimeType::findByPath(file);
  20. tqWarning("Mime type (findByPath): %s", p->name().latin1());
  21. KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
  22. }
  23. return 0;
  24. }