FileFormatUtil

FileFormatUtil class

Provides utility methods for converting file format enums to strings or file extensions and back.

Constructors

NameDescription
FileFormatUtil

Methods

NameDescription
detectFileFormatDetects and returns the information about a format of a visio stored in a stream.

FileFormatUtil()

detectFileFormat(stream) (1 of 2)

Detects and returns the information about a format of a visio stored in a stream.

ParameterTypeDescription
streamInputStreamThe stream

Returns: A FileFormatInfo object that contains the detected information.


detectFileFormat(filePath) (2 of 2)

Detects and returns the information about a format of a visio stored in a file.

ParameterTypeDescription
filePathStringThe file path.

Returns: A FileFormatInfo object that contains the detected information.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

info = aspose.diagram.FileFormatUtil.detectFileFormat("example.vsdx");
console.log("detect result: " + info.getFileFormatType());