REST Resource: parents
資源:ParentReference
檔案父項的參照。
一個檔案只能有一個上層資料夾;不支援指定多個上層。
部分資源方法 (例如 parents.get
) 需要 parentId
。使用 parents.list
方法擷取父項的 ID。
JSON 表示法 |
{
"selfLink": string,
"id": string,
"isRoot": boolean,
"kind": string,
"parentLink": string
} |
欄位 |
selfLink |
string
僅供輸出。返回這個參考檔案的連結。
|
id |
string
父項的 ID。
|
isRoot |
boolean
僅供輸出。父項是否為根資料夾。
|
kind |
string
僅供輸出。一律為 drive#parentReference 。
|
parentLink |
string
僅供輸出。父項連結。
|
方法 |
|
移除檔案的父項。 |
|
取得特定父項參照。 |
|
新增檔案的上層資料夾。 |
|
列出檔案的父項。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-04 (世界標準時間)。
[null,null,["上次更新時間:2024-09-04 (世界標準時間)。"],[[["`ParentReference` is a resource that represents a file's parent folder, and files can only have one parent folder at a time."],["You can retrieve a parent's ID using the `parents.list` method which is necessary for some resource methods like `parents.get`."],["The `ParentReference` resource provides methods for managing parent folders, including `delete`, `get`, `insert`, and `list`, letting you manipulate a file's parent relationship."],["The JSON representation of `ParentReference` includes fields such as `selfLink`, `id`, `isRoot`, `kind`, and `parentLink`, offering detailed information about the parent-child relationship."]]],[]]