Functions - internal

compress

Compresses a directory.

compressToByteArray

Compresses a directory into a byte array.

decompress

Decompresses a compressed file.

decompressFromByteArray

Decompresses a byte array into a directory.

execBallerinaDoc

Executes a ballerina doc command

compress

(Path dirPath, Path destDir)

returns error?

Compresses a directory.

Parameters

  • dirPath Path
  • Path of the directory to be compressed

  • destDir Path
  • Path of the directory to place the compressed file

  • Return Type

    (error?)
  • An error if an error occurs during the compression process

compressToByteArray

(Path dirPath)

returns byte[] | error

Compresses a directory into a byte array.

Parameters

  • dirPath Path
  • Path of the directory to be compressed

  • Return Type

    (byte[] | error)
  • Compressed byte array of the file. An error if an error occurs during the compression process.

decompress

(Path dirPath, Path destDir)

returns error?

Decompresses a compressed file.

Parameters

  • dirPath Path
  • Path of the compressed file

  • destDir Path
  • Path of the directory to decompress the file

  • Return Type

    (error?)
  • An error if an error occurs during the decompression process

decompressFromByteArray

(byte[] content, Path destDir)

returns error?

Decompresses a byte array into a directory.

Parameters

  • content byte[]
  • Byte array of the compressed file

  • destDir Path
  • Path of the directory to decompress the file

  • Return Type

    (error?)
  • An error if an error occurs during the decompression process

execBallerinaDoc

(string[] moduleList, string? sourceRoot, string? outputPath, string? templatesPath, string[]? exclude, boolean includeNatives, map? envVars, string? config, boolean verbose)

returns string | error

Executes a ballerina doc command

Parameters

  • moduleList string[]
  • List of modules

  • sourceRoot string? - ()
  • Root folder of the modules

  • outputPath string? - ()
  • Path to write api-docs

  • templatesPath string? - ()
  • Location of the templates

  • exclude string[]? - ()
  • Modules to exclude

  • includeNatives boolean - false
  • Generate docs for natives

  • envVars map? - ()
  • Environment variables to pass

  • config string? - ()
  • Path to configuration file

  • verbose boolean - false
  • Verbose mode

  • Return Type

    (string | error)
  • Data piped from the standard output and error output of the process