DataFolder Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

A data folder that contains a collection of data items.

Methods

Name Description
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe Deletes this folder item.
uploadAssembly Uploads a set of files that represent an assembly There should only be a single top-level assembly file but there can be any number of other files that represent sub-assemblies.
uploadFile Uploads a single file to this directory.

Properties

Name Description
dataFiles Returns a collection containing all of the items within this folder, excluding folders. Use the dataFolders property to get the folders.
dataFolders Returns a collection containing all of the folders within this folder.
id Returns the unique ID for this folder. This is the same id used in the Forge Data Management API.
isRoot Indicates if this folder is the root folder within the parent project.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name Gets and sets the displayed name of this folder.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentFolder Returns the parent folder this folder is contained within. Returns null if this is the project's root folder.
parentProject Returns the parent project that owns this folder.

Accessed From

CloudFileDialog.dataFolder, CopyFileInput.targetFolder, Data.activeFolder, DataFile.parentFolder, DataFolder.parentFolder, DataFolders.add, DataFolders.asArray, DataFolders.item, DataFolders.itemById, DataFolders.itemByName, DataProject.rootFolder, DesignDataFile.parentFolder

Version

Introduced in version January 2015