Class EditorFileScopeActionResponseBuilder
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
详细文档
requestFileScopeForActiveDocument()
请求当前处于活动状态的编辑器文档的 drive.file 作用域。
// Display a permissions dialog to the user, requesting `drive.file` scope for
// the current document on behalf of this add-on.
CardService.newEditorFileScopeActionResponseBuilder()
    .requestFileScopeForActiveDocument()
    .build();
注意:如需调用此方法,您必须将 drive.file 作用域添加到插件清单中。
返回
EditorFileScopeActionResponseBuilder - 此对象,用于链式调用。
 
 
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-26。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-26。"],[],["The `EditorFileScopeActionResponseBuilder` creates `EditorFileScopeActionResponse` objects.  It offers two methods: `build()`, which finalizes and validates the response, and `requestFileScopeForActiveDocument()`, which prompts the user for `drive.file` scope permission for the active document.  Using `requestFileScopeForActiveDocument()` requires declaring the `drive.file` scope in the add-on's manifest.  These methods facilitate the creation and management of actions related to file scope permissions within an editor.\n"]]