asposediagram.api

Class FileFormatUtil

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

Constructor Summary
 
Method Summary
static methoddetectFileFormat(stream)
Detects and returns the information about a format of a visio stored in a stream.
static methoddetectFileFormat(filePath)
Detects and returns the information about a format of a visio stored in a file.
 

    • Constructor Detail

      • FileFormatUtil

        FileFormatUtil()
    • Method Detail

      • detectFileFormat

        static FileFormatInfo detectFileFormat(stream)
        Detects and returns the information about a format of a visio stored in a stream.
        Parameters:
        stream: InputStream - The stream
        Returns:
        A FileFormatInfo object that contains the detected information.
      • detectFileFormat

        static FileFormatInfo detectFileFormat(filePath)
        Detects and returns the information about a format of a visio stored in a file.
        Parameters:
        filePath: String - The 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());