API Namespace Fs is used for BIM.works FileSystem related API calls.

A note about "paths" in BIM.works: Paths are relative to your credentials. For example an API Token that has been created on "/My Organization/Sub Folder" will resolve "/" to "/My Organization/Sub Folder"

Constructors

  • Returns Fs

Methods

  • Create a new Node

    Parameters

    • parentNodeUuid: string

      The Nid of the parent Node under which to create the new Node

    • name: string

      The name of the new Node

    • isFolder: boolean

      Whether this new Node should be a folder or not

    • inputFileType: InputFileType

      The type of files that will be stored in this Node, for a folder node use FOLDER

    Returns Promise<string>

    The Nid of the newly created Node

  • Create a new Node, but only if it did not already exist

    Parameters

    • parentNodeUuid: string

      The Nid of the parent Node under which to create the new Node

    • name: string

      The name of the new Node

    • isFolder: boolean

      Whether this new Node should be a folder or not

    • inputFileType: InputFileType

      The type of files that will be stored in this Node, for a folder node use FOLDER

    Returns Promise<string>

    The Nid of the newly created Node, of if the Node already existed the Nid of the existing Node

  • Delete a Node by it's Nid. Will throw an exception if the Node does not exist or was already deleted.

    Parameters

    • nodeUuid: string

      The UUID of the Node to delete

    Returns Promise<unknown>

  • Delete a NodeError by it's id

    Parameters

    • nodeUuid: string

      The UUID of the Node

    • errorUuid: string

      The UUID of the Error

    Returns Promise<unknown>

  • Will delete the designated Node if is has not already been deleted. Will not throw an exception when there is no such Node.

    Parameters

    • nodeUuid: string

      The UUID of the Node to delete

    Returns Promise<void>

  • Delete a Version. In a future version, the requirement to specify the nodeUuid in this method will be dropped

    Parameters

    • nodeUuid: string
    • versionUuid: string

    Returns Promise<unknown>

  • Get a Node by a given Vid. This can be useful if you want to quickly go from a known Vid o Node without first resolving the Version object.

    Parameters

    • versionUuid: string

    Returns Promise<Node>

  • Get the Nid of the root Node of the current authorization context

    Returns Promise<string>

  • List all the known Error on the given Node

    Parameters

    • nodeUuid: string

    Returns Promise<unknown>

  • List all the known Version on the given Node

    Parameters

    • nodeUuid: string

    Returns Promise<unknown>

  • List all the direct child Nodes of the given Nid.

    Parameters

    • uuid: string

    Returns Promise<{
        nodes: Node[];
    }>

  • List all the child nodes of the Node on the given path

    Parameters

    • path: string

    Returns Promise<{
        nodes: Node[];
    }>

  • Recursively list all the child Nodes of the given Nid. The Promise will resolve to a flat array of all the nodes.

    Parameters

    • nodeUuid: string

    Returns Promise<{
        nodes: Node[];
    }>

  • Parameters

    • path: string

    Returns Promise<unknown>

    Whether a Node already exists on the given path

  • Rename an existing Node

    Parameters

    • nodeUuid: string

      The UUID of the Node

    • newName: string

      The new name of the Node

    Returns Promise<void>

  • Undelete a given Node. Undeleting Nodes is currently only allowed for users with SUPER_ADMIN rights

    Parameters

    • nodeUuid: string

      The UUID of the Node to undelete

    Returns Promise<void>