MCPcopy Create free account
hub / github.com/TeXworks/texworks / isPostscriptFile

Function isPostscriptFile

src/document/Document.cpp:49–58  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

47
48// static
49bool isPostscriptFile(const QString& fileName)
50{
51 QFile theFile(fileName);
52 if (theFile.open(QIODevice::ReadOnly)) {
53 QByteArray ba = theFile.peek(4);
54 if (ba.startsWith("%!PS"))
55 return true;
56 }
57 return false;
58}
59
60} // namespace Document
61} // namespace Tw

Callers 2

isPostscriptFileMethod · 0.85
foreachFunction · 0.85

Calls 1

openMethod · 0.45

Tested by 1

isPostscriptFileMethod · 0.68