#include <file.h>
File contains metadata for a file.
Getters and setters' documentation is based on Google Drive's API v2 reference
- See also
- Files
- Since
- 2.0
- Author
- Andrius da Costa Ribas andri.nosp@m.usma.nosp@m.o@gma.nosp@m.il.c.nosp@m.om
-
Daniel Vrátil dvrat.nosp@m.il@r.nosp@m.edhat.nosp@m..com
Definition at line 36 of file file.h.
◆ ImageMediaMetadataPtr
◆ IndexableTextPtr
◆ LabelsList
◆ LabelsPtr
◆ SerializationOptions
◆ ThumbnailPtr
◆ SerializationOption
JSON serialization options.
- Since
- 5.3.1
Enumerator |
---|
NoOptions | No option set.
|
ExcludeCreationDate | Exclude 'createdDate' entry. This is necessary when renaming URLs.
|
Definition at line 320 of file file.h.
◆ alternateLink()
QUrl KGAPI2::Drive::File::alternateLink |
( |
| ) |
const |
|
nodiscard |
Returns a link for opening the file in using a relevant Google editor or viewer.
◆ createdDate()
QDateTime KGAPI2::Drive::File::createdDate |
( |
| ) |
const |
|
nodiscard |
Returns the create time for this file.
◆ description()
QString KGAPI2::Drive::File::description |
( |
| ) |
const |
|
nodiscard |
Returns a short description of the file.
◆ downloadUrl()
QUrl KGAPI2::Drive::File::downloadUrl |
( |
| ) |
const |
|
nodiscard |
Returns a short lived download URL for the file.
This is only populated for files with content stored in Drive.
◆ editable()
bool KGAPI2::Drive::File::editable |
( |
| ) |
const |
|
nodiscard |
Returns whether the file can be edited by the current user.
◆ embedLink()
QUrl KGAPI2::Drive::File::embedLink |
( |
| ) |
const |
|
nodiscard |
Returns a link for embedding the file.
◆ explicitlyTrashed()
bool KGAPI2::Drive::File::explicitlyTrashed |
( |
| ) |
const |
|
nodiscard |
Returns whether this file has been explicitly trashed, as opposed to recursively trashed.
This will only be populated if the file is trashed.
◆ exportLinks()
Returns the links for exporting Google Docs to specific formats.
This is a map from the export format to URL.
◆ fileExtension()
QString KGAPI2::Drive::File::fileExtension |
( |
| ) |
const |
|
nodiscard |
Returns the file extension used when downloading this file.
This field is read only. To set the extension, include it on title when creating the file. This is populated only for files with content stored in Drive.
◆ fileSize()
qlonglong KGAPI2::Drive::File::fileSize |
( |
| ) |
const |
|
nodiscard |
Returns the size of the file in bytes.
This is populated only for files with content stored in Drive.
◆ folderMimeType()
static QString KGAPI2::Drive::File::folderMimeType |
( |
| ) |
|
|
static |
Returns mimetype of folders.
◆ id()
QString KGAPI2::Drive::File::id |
( |
| ) |
const |
|
nodiscard |
Returns the id of the file.
◆ imageMediaMetadata()
Returns metadata about image media.
This will only be present for image types, and its contents will depend on what can be parsed from the image content.
◆ indexableText()
Returns the indexable text attributes for the file.
This property can only be written, and is not returned by files.get
◆ labels()
Returns a group of labels for the file.
◆ lastModifyingUserName()
QString KGAPI2::Drive::File::lastModifyingUserName |
( |
| ) |
const |
|
nodiscard |
Returns the name of the last user to modify this file.
This will only be populated if a user has edited this file.
◆ lastViewedByMeDate()
QDateTime KGAPI2::Drive::File::lastViewedByMeDate |
( |
| ) |
const |
|
nodiscard |
Returns the last time this file was viewed by the user.
◆ md5Checksum()
QString KGAPI2::Drive::File::md5Checksum |
( |
| ) |
const |
|
nodiscard |
Returns an MD5 checksum for the content of this file.
This is populated only for files with content stored in Drive.
◆ mimeType()
QString KGAPI2::Drive::File::mimeType |
( |
| ) |
const |
|
nodiscard |
Returns the MIME type of the file.
◆ modifiedByMeDate()
QDateTime KGAPI2::Drive::File::modifiedByMeDate |
( |
| ) |
const |
|
nodiscard |
Returns the last time this file was modified by the currently authenticated user.
◆ modifiedDate()
QDateTime KGAPI2::Drive::File::modifiedDate |
( |
| ) |
const |
|
nodiscard |
Returns the last time this file was modified by anyone.
This is only mutable on update when the setModifiedDate parameter is set.
◆ operator!=()
bool KGAPI2::Drive::File::operator!= |
( |
const File & | other | ) |
const |
|
inline |
◆ originalFileName()
QString KGAPI2::Drive::File::originalFileName |
( |
| ) |
const |
|
nodiscard |
Returns the original filename if the file was uploaded manually, or the original title if the file was inserted through the API.
Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
◆ ownerNames()
Return the name(s) of the owner(s) of this file.
◆ parents()
Returns the collection of parent folders which contain this file.
Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
◆ quotaBytesUsed()
qlonglong KGAPI2::Drive::File::quotaBytesUsed |
( |
| ) |
const |
|
nodiscard |
Returns the number of quota bytes used by this file.
◆ selfLink()
QUrl KGAPI2::Drive::File::selfLink |
( |
| ) |
const |
|
nodiscard |
Returns a link back to this file.
◆ setDescription()
void KGAPI2::Drive::File::setDescription |
( |
const QString & | description | ) |
|
Sets a short description of the file.
- Parameters
-
◆ setLabels()
void KGAPI2::Drive::File::setLabels |
( |
const LabelsPtr & | labels | ) |
|
Sets a group of labels for the file.
- Parameters
-
◆ setLastViewedByMeDate()
void KGAPI2::Drive::File::setLastViewedByMeDate |
( |
const QDateTime & | lastViewedByMeDate | ) |
|
Sets the last time this file was viewed by the user.
- Parameters
-
◆ setMimeType()
void KGAPI2::Drive::File::setMimeType |
( |
const QString & | mimeType | ) |
|
Sets the MIME type of the file.
- Parameters
-
◆ setModifiedDate()
void KGAPI2::Drive::File::setModifiedDate |
( |
const QDateTime & | modifiedDate | ) |
|
Sets the last time this file was modified by anyone.
This is only mutable on update when the setModifiedDate parameter is set.
- Parameters
-
◆ setParents()
Sets the collection of parent folders which contain this file.
Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
- Parameters
-
◆ setTitle()
void KGAPI2::Drive::File::setTitle |
( |
const QString & | title | ) |
|
Sets the title of this file.
Used to identify file or folder name.
- Parameters
-
◆ sharedWithMeDate()
QDateTime KGAPI2::Drive::File::sharedWithMeDate |
( |
| ) |
const |
|
nodiscard |
Returns the time at which this file was shared with the user.
◆ thumbnail()
Returns thumbnail for the file.
◆ thumbnailLink()
QUrl KGAPI2::Drive::File::thumbnailLink |
( |
| ) |
const |
|
nodiscard |
Returns a link to the file's thumbnail.
◆ title()
QString KGAPI2::Drive::File::title |
( |
| ) |
const |
|
nodiscard |
Returns the title of this file.
Used to identify file or folder name.
◆ userPermission()
Returns the permissions for the authenticated user on this file.
◆ version()
qlonglong KGAPI2::Drive::File::version |
( |
| ) |
const |
|
nodiscard |
Returns the version of the file;.
◆ webContentLink()
QUrl KGAPI2::Drive::File::webContentLink |
( |
| ) |
const |
|
nodiscard |
Returns a link for downloading the content of the file in a browser using cookie based authentication.
In cases where the content is shared publicly, the content can be downloaded without any credentials.
◆ writersCanShare()
bool KGAPI2::Drive::File::writersCanShare |
( |
| ) |
const |
|
nodiscard |
Returns whether writers can share the document with other users.
The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:12 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.