# Resource

Represents a file or folder in external storage.

> Kind: Apex type · Updated: 2026-07-01

A Resource represents a file or a folder in external storage. It is returned by folder and file operations such as Client.createFolders(), which yields a List<Resource&gt; in input order.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | optional | External Id of the resource. |
| type | String | optional | One of file or folder. |
| name | String | optional | Name of the resource, with extension in case of files. |
| library | String | optional | One of sharepoint, google, onedrive, box, dropbox, cloudfiles. |
| driveId | String | optional | Drive Id in external storage. Only applicable for SharePoint and Google Drive. You can get this value from the Content Library. |
| path | String | optional | The path to the target resource. |
| properties | Map&lt;String, String&gt; | optional | A map containing additional metadata about the resource. |

## Constructors

```apex
Resource(
  String id,
  String type,
  String name,
  String library,
  String driveId
)
```

```apex
Resource(
  String id,
  String type,
  String name,
  String library,
  String driveId,
  String path
)
```
