# File

- [JSON representation](https://developers.google.com/apps-script/api/reference/rest/v1/File#SCHEMA_REPRESENTATION)
- [FileType](https://developers.google.com/apps-script/api/reference/rest/v1/File#FileType)
- [FunctionSet](https://developers.google.com/apps-script/api/reference/rest/v1/File#FunctionSet)
  - [JSON representation](https://developers.google.com/apps-script/api/reference/rest/v1/File#FunctionSet.SCHEMA_REPRESENTATION)
- [Function](https://developers.google.com/apps-script/api/reference/rest/v1/File#Function)
  - [JSON representation](https://developers.google.com/apps-script/api/reference/rest/v1/File#Function.SCHEMA_REPRESENTATION)

An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.

| JSON representation |
|---|
| ``` { "name": string, "type": enum (`https://developers.google.com/apps-script/api/reference/rest/v1/File#FileType`), "source": string, "lastModifyUser": { object (`https://developers.google.com/apps-script/api/reference/rest/v1/projects#User`) }, "createTime": string, "updateTime": string, "functionSet": { object (`https://developers.google.com/apps-script/api/reference/rest/v1/File#FunctionSet`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the file. The file extension is not part of the file name, which can be identified from the type field. |
| `type` | ``enum (`https://developers.google.com/apps-script/api/reference/rest/v1/File#FileType`)`` The type of the file. |
| `source` | `string` The file content. |
| `lastModifyUser` | ``object (`https://developers.google.com/apps-script/api/reference/rest/v1/projects#User`)`` The user who modified the file most recently. The details visible in this object are controlled by the profile visibility settings of the last modifying user. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Creation date timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Last modified date timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `functionSet` | ``object (`https://developers.google.com/apps-script/api/reference/rest/v1/File#FunctionSet`)`` The defined set of functions in the script file, if any. |

## FileType

An enumeration of different types of files.

| Enums ||
|---|---|
| `ENUM_TYPE_UNSPECIFIED` | Undetermined file type; never actually used. |
| `SERVER_JS` | An Apps Script server-side code file. |
| `HTML` | A file containing client-side HTML. |
| `JSON` | A file in JSON format. This type is only used for the script project's manifest. The manifest file content must match the structure of a valid [ScriptManifest](https://developers.google.com/apps-script/concepts/manifests) |

## FunctionSet

A set of functions. No duplicates are permitted.

| JSON representation |
|---|
| ``` { "values": [ { object (`https://developers.google.com/apps-script/api/reference/rest/v1/File#Function`) } ] } ``` |

| Fields ||
|---|---|
| `values[]` | ``object (`https://developers.google.com/apps-script/api/reference/rest/v1/File#Function`)`` A list of functions composing the set. |

## Function

Represents a function in a script project.

| JSON representation |
|---|
| ``` { "name": string, "parameters": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` The function name in the script project. |
| `parameters[]` | `string` The ordered list of parameter names of the function in the script project. |