vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class RetrieveResultFile

    Implements

    Index

    Constructors

    Properties

    archivePath: string

    Path of the file in the zip archive; when a single package is retrieved this is the same as packagePath.

    componentName: string

    Name of the component (e.g. MyClass) to which this file belongs.

    componentType: string

    Type of the component (e.g. ApexClass)

    contentFile?: JSZipObject
    metaFile?: JSZipObject
    packagePath: string

    Package path of the file, if a single package the package path will be the same as archivePath.

    Accessors

    Methods

    • Expand the metadata file into its constituent parts, such as content and metadata files. This method uses the MetadataExpander to expand the metadata file and returns a record of the expanded files.

      Returns Promise<Record<string, Buffer<ArrayBufferLike>>>

      A record of expanded files where the keys are the file names and the values are the file contents as buffers.

    • Extracts and writes expanded metadata files to the specified target folder.

      This method uses the MetadataExpander to expand the current metadata object, then writes each expanded file to the given target directory. The method returns a list of the relative file paths that were written.

      Parameters

      • targetFolder: string

        The absolute or relative path to the folder where the expanded files will be written.

      Returns Promise<string[]>

      A promise that resolves to an array of file paths representing the files that were written.

    • When metadata is split between content and meta files, this method returns the metadata associated to the content as (parsed) XML object.

      • If there are XML attributes they are grouped under the @attributes property.
      • The type of the metadata is stored in the @type property.

      Note: This only returns metadata for components that have a separate content and metadata files.

      Returns Promise<undefined | object & { "@type": string }>