یک فایل جداگانه در یک پروژه اسکریپت. یک فایل یک کد منبع شخص ثالث است که توسط یک یا چند توسعه دهنده ایجاد شده است. این می تواند یک کد JS سمت سرور، HTML یا یک فایل پیکربندی باشد. هر پروژه اسکریپت می تواند حاوی چندین فایل باشد.
مجموعه ای از توابع تعریف شده در فایل اسکریپت، در صورت وجود.
نوع فایل
شمارشی از انواع مختلف فایل ها
Enums
ENUM_TYPE_UNSPECIFIED
نوع فایل نامشخص؛ هرگز واقعا استفاده نشده است
SERVER_JS
فایل کد سمت سرور Apps Script.
HTML
یک فایل حاوی HTML سمت سرویس گیرنده.
JSON
یک فایل با فرمت JSON. این نوع فقط برای مانیفست پروژه اسکریپت استفاده می شود. محتوای فایل مانیفست باید با ساختار یک ScriptManifest معتبر مطابقت داشته باشد
تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eA file in a script project represents third-party source code and can be server-side JS, HTML, or a configuration file.\u003c/p\u003e\n"],["\u003cp\u003eEach script project can contain multiple files, each with properties like name, type, source code, and modification details.\u003c/p\u003e\n"],["\u003cp\u003eFiles can contain a set of functions, each defined by its name and parameters, contributing to the script's functionality.\u003c/p\u003e\n"],["\u003cp\u003eFiles can be of various types, including server-side JavaScript, HTML, JSON for the project manifest, ensuring diverse script capabilities.\u003c/p\u003e\n"]]],[],null,["- [JSON representation](#SCHEMA_REPRESENTATION)\n- [FileType](#FileType)\n- [FunctionSet](#FunctionSet)\n - [JSON representation](#FunctionSet.SCHEMA_REPRESENTATION)\n- [Function](#Function)\n - [JSON representation](#Function.SCHEMA_REPRESENTATION)\n\nAn 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.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"type\": enum (/apps-script/api/reference/rest/v1/File#FileType), \"source\": string, \"lastModifyUser\": { object (/apps-script/api/reference/rest/v1/projects#User) }, \"createTime\": string, \"updateTime\": string, \"functionSet\": { object (/apps-script/api/reference/rest/v1/File#FunctionSet) } } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n| `type` | `enum (`[FileType](/apps-script/api/reference/rest/v1/File#FileType)`)` The type of the file. |\n| `source` | `string` The file content. |\n| `lastModifyUser` | `object (`[User](/apps-script/api/reference/rest/v1/projects#User)`)` The user who modified the file most recently. This read-only field is only visible to users who have WRITER permission for the script project. |\n| `createTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project. 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\"`. |\n| `updateTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project. 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\"`. |\n| `functionSet` | `object (`[FunctionSet](/apps-script/api/reference/rest/v1/File#FunctionSet)`)` The defined set of functions in the script file, if any. |\n\nFileType An enumeration of different types of files.\n\n| Enums ||\n|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ENUM_TYPE_UNSPECIFIED` | Undetermined file type; never actually used. |\n| `SERVER_JS` | An Apps Script server-side code file. |\n| `HTML` | A file containing client-side HTML. |\n| `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](/apps-script/concepts/manifests) |\n\nFunctionSet A set of functions. No duplicates are permitted.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------|\n| ``` { \"values\": [ { object (/apps-script/api/reference/rest/v1/File#Function) } ] } ``` |\n\n| Fields ||\n|------------|------------------------------------------------------------------------------------------------------------------|\n| `values[]` | `object (`[Function](/apps-script/api/reference/rest/v1/File#Function)`)` A list of functions composing the set. |\n\nFunction Represents a function in a script project.\n\n| JSON representation |\n|------------------------------------------------------|\n| ``` { \"name\": string, \"parameters\": [ string ] } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------|\n| `name` | `string` The function name in the script project. |\n| `parameters[]` | `string` The ordered list of parameter names of the function in the script project. |"]]