Bundle Paths

A BundlePath is a single bundlepath in the associated Bundle.

Update Bundle Path

SDK Method

bundle.UpdateBundle()

Return Values

Returns a files_sdk.BundlePath value and an error.

Authorization Requirement

Available to all authenticated keys or sessions.

BundleUpdateBundleParams Fields

FieldDescription
Id
int64
Required
Bundle ID.
Path
string
Required
Path to operate on.
Recursive
boolean
Required
Allow access to subfolders content?

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    "github.com/Files-com/files-sdk-go/v3/bundle"
    "github.com/Files-com/files-sdk-go/v3/lib"
)

bundlePath, err := bundle.UpdateBundle(files_sdk.BundleUpdateBundleParams{
  Id: 1,
  Path: "path",
  Recursive: lib.Bool(true),
})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Printf("API error (%s): %s\n", respErr.Type, respErr.ErrorMessage)
    } else {
        fmt.Printf("Request failed: %v\n", err)
    }
    return
}
fmt.Println(bundlePath)

The BundlePath Object

Some of the methods above return a BundlePath object. The attributes of this object are listed below.

AttributeDescription
Recursive
boolean
Allow access to subfolders content?
Path
string
The path to the resource relative to filesystem. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.