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.
29 lines
662 B
29 lines
662 B
15 years ago
|
#include <stdio.h>
|
||
15 years ago
|
#include <tqdir.h>
|
||
|
#include <tqfile.h>
|
||
15 years ago
|
#include <kinstance.h>
|
||
|
#include <kurl.h>
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
15 years ago
|
#include <kmimetype.h>
|
||
|
|
||
|
int main (int argc, char **argv)
|
||
|
{
|
||
12 years ago
|
TDEInstance ins("kmfitest");
|
||
15 years ago
|
|
||
|
if (argc < 2) {
|
||
|
printf("usage: %s <file>\n", argv[0]);
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
for (int i = 1; i < argc; i++) {
|
||
15 years ago
|
TQString file = TQFile::decodeName(argv[i]);
|
||
13 years ago
|
tqWarning("File: %s", file.local8Bit().data());
|
||
15 years ago
|
KMimeType::Ptr p;
|
||
14 years ago
|
p = KMimeType::findByPath(file);
|
||
13 years ago
|
tqWarning("Mime type (findByPath): %s", p->name().latin1());
|
||
15 years ago
|
KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
|
||
15 years ago
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|