Constructor Summary |
---|
FileFormatUtil()
|
Method Summary | ||
---|---|---|
static function | detectFileFormat(filePath) | |
Detects and returns the information about a format of a visio stored in a file. | ||
static function | detectFileFormatFromStream(stream, callback) | |
Detects and returns the information about a format of a visio stored in a stream. |
Constructor Detail |
---|
function FileFormatUtil()
Method Detail |
---|
detectFileFormat | |
static function detectFileFormat(filePath) |
filePath: String
- The file path.Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); info = aspose.diagram.FileFormatUtil.detectFileFormat("example.vsdx"); console.log("detect result: " + info.getFileFormatType());
detectFileFormatFromStream | |
static function detectFileFormatFromStream(stream, callback) |
stream: ReadableStream
- The streamcallback: Callback
- The callback functionExample:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); var fs = require("fs"); var readStream = fs.createReadStream("example.vsdx"); aspose.diagram.FileFormatUtil.detectFileFormatFromStream(readStream, function(result, err) { if (!err) { console.log("detect result: " + result.getFileFormatType()); } });