Trait

com.google.appsscript.drive

Folder

Related Doc: package drive

Permalink

trait Folder extends Object

Folder A folder in Google Drive. Folders can be accessed or created from DriveApp. // Log the name of every folder in the user's Drive. var folders = DriveApp.getFolders(); while (folders.hasNext()) { var folder = folders.next(); Logger.log(folder.getName()); }

Annotations
@RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Folder
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addEditor(user: User): Folder

    Permalink

    Adds the given user to the list of editors for the Folder.

    Adds the given user to the list of editors for the Folder. If the user was already on the list of viewers, this method promotes the user out of the list of viewers.

  5. def addEditor(emailAddress: String): Folder

    Permalink

    Adds the given user to the list of editors for the Folder.

    Adds the given user to the list of editors for the Folder. If the user was already on the list of viewers, this method promotes the user out of the list of viewers.

  6. def addEditors(emailAddresses: Array[String]): Folder

    Permalink

    Adds the given array of users to the list of editors for the Folder.

    Adds the given array of users to the list of editors for the Folder. If any of the users were already on the list of viewers, this method promotes them out of the list of viewers.

  7. def addFile(child: File): Folder

    Permalink

    Adds the given file to the current folder.

    Adds the given file to the current folder. This method does not move the file out of its existing parent folder; a file can have more than one parent simultaneously.

  8. def addFolder(child: Folder): Folder

    Permalink

    Adds the given folder to the current folder.

    Adds the given folder to the current folder. This method does not move the folder out of its existing parent folder; a folder can have more than one parent simultaneously.

  9. def addViewer(user: User): Folder

    Permalink

    Adds the given user to the list of viewers for the Folder.

    Adds the given user to the list of viewers for the Folder. If the user was already on the list of editors, this method has no effect.

  10. def addViewer(emailAddress: String): Folder

    Permalink

    Adds the given user to the list of viewers for the Folder.

    Adds the given user to the list of viewers for the Folder. If the user was already on the list of editors, this method has no effect.

  11. def addViewers(emailAddresses: Array[String]): Folder

    Permalink

    Adds the given array of users to the list of viewers for the Folder.

    Adds the given array of users to the list of viewers for the Folder. If any of the users were already on the list of editors, this method has no effect for them.

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def createFile(name: String, content: String, mimeType: String): File

    Permalink

    Creates a file in the current folder with the given name, contents, and MIME type.

    Creates a file in the current folder with the given name, contents, and MIME type. Throws an exception if content is larger than 10MB.

  15. def createFile(name: String, content: String): File

    Permalink

    Creates a text file in the current folder with the given name and contents.

    Creates a text file in the current folder with the given name and contents. Throws an exception if content is larger than 10MB.

  16. def createFile(blob: BlobSource): File

    Permalink

    Creates a file in the current folder from a given Blob of arbitrary data.

  17. def createFolder(name: String): Folder

    Permalink

    Creates a folder in the current folder with the given name.

  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def getAccess(user: User): Permission

    Permalink

    Gets the permission granted to the given user.

  22. def getAccess(email: String): Permission

    Permalink

    Gets the permission granted to the given user.

  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def getDateCreated(): Date

    Permalink

    Gets the date the Folder was created.

  25. def getDescription(): String

    Permalink

    Gets the description for the Folder.

  26. def getEditors(): Array[User]

    Permalink

    Gets the list of editors for this Folder.

    Gets the list of editors for this Folder. If the user who executes the script does not have edit access to the Folder, this method returns an empty array.

  27. def getFiles(): FileIterator

    Permalink

    Gets a collection of all files that are children of the current folder.

  28. def getFilesByName(name: String): FileIterator

    Permalink

    Gets a collection of all files that are children of the current folder and have the given name.

  29. def getFilesByType(mimeType: String): FileIterator

    Permalink

    Gets a collection of all files that are children of the current folder and have the given MIME type.

  30. def getFolders(): FolderIterator

    Permalink

    Gets a collection of all folders that are children of the current folder.

  31. def getFoldersByName(name: String): FolderIterator

    Permalink

    Gets a collection of all folders that are children of the current folder and have the given name.

  32. def getId(): String

    Permalink

    Gets the ID of the Folder.

  33. def getLastUpdated(): Date

    Permalink

    Gets the date the Folder was last updated.

  34. def getName(): String

    Permalink

    Gets the name of the Folder.

  35. def getOwner(): User

    Permalink

    Gets the owner of the Folder.

  36. def getParents(): FolderIterator

    Permalink

    Gets a collection of folders that are immediate parents of the Folder.

  37. def getSharingAccess(): Access

    Permalink

    Gets which class of users can access the Folder, besides any individual users who have been explicitly given access.

  38. def getSharingPermission(): Permission

    Permalink

    Gets the permission granted to those users who can access the Folder, besides any individual users who have been explicitly given access.

  39. def getSize(): Int

    Permalink

    Gets the number of bytes used to store the Folder in Drive.

    Gets the number of bytes used to store the Folder in Drive. Note that Google Apps files do not count toward Drive storage limits and thus return 0 bytes.

  40. def getUrl(): String

    Permalink

    Gets the URL that can be used to open the Folder in a Google App like Drive or Docs.

  41. def getViewers(): Array[User]

    Permalink

    Gets the list of viewers and commenters for this Folder.

    Gets the list of viewers and commenters for this Folder. If the user who executes the script does not have edit access to the Folder, this method returns an empty array.

  42. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  43. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  44. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  45. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  46. def isShareableByEditors(): Boolean

    Permalink

    Determines whether users with edit permissions to the Folder are allowed to share with other users or change the permissions.

  47. def isStarred(): Boolean

    Permalink

    Determines whether the Folder has been starred in the user's Drive.

  48. def isTrashed(): Boolean

    Permalink

    Determines whether the Folder is in the trash of the user's Drive.

  49. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  50. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  52. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  53. def removeEditor(user: User): Folder

    Permalink

    Removes the given user from the list of editors for the Folder.

    Removes the given user from the list of editors for the Folder. This method does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  54. def removeEditor(emailAddress: String): Folder

    Permalink

    Removes the given user from the list of editors for the Folder.

    Removes the given user from the list of editors for the Folder. This method does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  55. def removeFile(child: File): Folder

    Permalink

    Removes the given file from the current folder.

    Removes the given file from the current folder. This method does not delete the file, but if a file is removed from all of its parents, it cannot be seen in Drive except by searching for it or using the "All items" view.

  56. def removeFolder(child: Folder): Folder

    Permalink

    Removes the given folder from the current folder.

    Removes the given folder from the current folder. This method does not delete the folder or its contents, but if a folder is removed from all of its parents, it cannot be seen in Drive except by searching for it or using the "All items" view.

  57. def removeViewer(user: User): Folder

    Permalink

    Removes the given user from the list of viewers and commenters for the Folder.

    Removes the given user from the list of viewers and commenters for the Folder. This method has no effect if the user is an editor, not a viewer. This method also does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  58. def removeViewer(emailAddress: String): Folder

    Permalink

    Removes the given user from the list of viewers and commenters for the Folder.

    Removes the given user from the list of viewers and commenters for the Folder. This method has no effect if the user is an editor, not a viewer or commenter. This method also does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  59. def revokePermissions(user: User): Folder

    Permalink

    Revokes the access to the Folder granted to the given user.

    Revokes the access to the Folder granted to the given user. This method does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  60. def revokePermissions(user: String): Folder

    Permalink

    Revokes the access to the Folder granted to the given user.

    Revokes the access to the Folder granted to the given user. This method does not block users from accessing the Folder if they belong to a class of users who have general access — for example, if the Folder is shared with the user's entire domain.

  61. def searchFiles(params: String): FileIterator

    Permalink

    Gets a collection of all files that are children of the current folder and match the given search criteria.

    Gets a collection of all files that are children of the current folder and match the given search criteria. The search criteria are detailed the Google Drive SDK documentation. Note that the params argument is a query string that may contain string values, so take care to escape quotation marks correctly (for example "title contains 'Gulliver\\'s Travels'" or 'title contains "Gulliver\'s Travels"').

  62. def searchFolders(params: String): FolderIterator

    Permalink

    Gets a collection of all folders that are children of the current folder and match the given search criteria.

    Gets a collection of all folders that are children of the current folder and match the given search criteria. The search criteria are detailed the Google Drive SDK documentation. Note that the params argument is a query string that may contain string values, so take care to escape quotation marks correctly (for example "title contains 'Gulliver\\'s Travels'" or 'title contains "Gulliver\'s Travels"').

  63. def setDescription(description: String): Folder

    Permalink

    Sets the description for the Folder.

  64. def setName(name: String): Folder

    Permalink

    Sets the name of the Folder.

  65. def setOwner(user: User): Folder

    Permalink

    Changes the owner of the Folder.

    Changes the owner of the Folder. This method also gives the previous owner explicit edit access to the Folder.

  66. def setOwner(emailAddress: String): Folder

    Permalink

    Changes the owner of the Folder.

    Changes the owner of the Folder. This method also gives the previous owner explicit edit access to the Folder.

  67. def setShareableByEditors(shareable: Boolean): Folder

    Permalink

    Sets whether users with edit permissions to the Folder are allowed to share with other users or change the permissions.

    Sets whether users with edit permissions to the Folder are allowed to share with other users or change the permissions. The default for a new Folder is true.

  68. def setSharing(accessType: Access, permissionType: Permission): Folder

    Permalink

    Sets which class of users can access the Folder and what permissions those users are granted, besides any individual users who have been explicitly given access.

  69. def setStarred(starred: Boolean): Folder

    Permalink

    Sets whether the Folder is starred in the user's Drive.

    Sets whether the Folder is starred in the user's Drive. The default for new Folders is false.

  70. def setTrashed(trashed: Boolean): Folder

    Permalink

    Sets whether the Folder is in the trash of the user's Drive.

    Sets whether the Folder is in the trash of the user's Drive. The default for new Folders is false.

  71. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  72. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  73. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  74. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  75. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped