Krizalys Onedrive File - krizalys/onedrive-php-sdk GitHub Wiki
Krizalys\Onedrive\File
A proxy to a file stored on a OneDrive drive.
A File instance is a kind of DriveItem
instance which may have content, downloadable using
fetchContent(), but may not have child OneDrive
items.
- Class name: File
- Namespace: Krizalys\Onedrive
- Parent class: Krizalys\Onedrive\DriveItem
- Warning: this class is deprecated. This means that this class will likely be removed in a future version.
Properties
$_client
protected \Krizalys\Onedrive\Client $_client
- Visibility: protected
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_id
protected string $_id
- Visibility: protected
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_parentId
private string $_parentId
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_name
private string $_name
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_description
private string $_description
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_size
private integer $_size
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_source
private string $_source
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_createdTime
private integer $_createdTime
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
$_updatedTime
private integer $_updatedTime
- Visibility: private
- Warning: this property is deprecated. This means that this property will likely be removed in a future version.
Methods
__construct
mixed Krizalys\Onedrive\DriveItem::__construct(\Krizalys\Onedrive\Client $client, null|string $id, array<mixed,mixed>|object $options)
Constructor.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
Arguments
-
$client Krizalys\Onedrive\Client - The
Clientinstance owning thisDriveIteminstance. -
$id null|string - The unique ID of the OneDrive drive item referenced by this
DriveIteminstance. -
$options array<mixed,mixed>|object
The options. Supported options:
'parent_id'(string): the unique ID of the parent OneDrive folder of this drive item ;'name'(string): the name of this drive item ;'description'(string): the description of this drive item. May be empty ;'size'(int): the size of this drive item, in bytes ;'source'(string): the source link of this drive item ;'created_time'(string): the creation time, as an RFC date/time ;'updated_time'(string): the last modification time, as an RFC date/time.
fetchContent
string Krizalys\Onedrive\File::fetchContent(\Krizalys\Onedrive\mixed[string] $options)
Fetches the content of the OneDrive file referenced by this File instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Arguments
- $options Krizalys\Onedrive\mixed[string] - The extra cURL options to apply. Unused.
copy
mixed Krizalys\Onedrive\File::copy(null|string $destinationId)
Copies the OneDrive file referenced by this File instance into another OneDrive folder.
$destinationId must refer to a folder.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Arguments
- $destinationId null|string - The unique ID of the OneDrive folder into which to copy the OneDrive file referenced by this
Fileinstance, ornullto copy it in the OneDrive root folder. Default:null.
isFolder
boolean Krizalys\Onedrive\DriveItem::isFolder()
Determines whether the OneDrive drive item referenced by this DriveItem instance is a folder.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
fetchProperties
array<mixed,mixed> Krizalys\Onedrive\DriveItem::fetchProperties()
Fetches the properties of the OneDrive drive item referenced by this DriveItem instance.
Some properties are cached for faster subsequent access.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getId
string Krizalys\Onedrive\DriveItem::getId()
Gets the unique ID of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getParentId
string Krizalys\Onedrive\DriveItem::getParentId()
Gets the unique ID of the parent folder of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getName
string Krizalys\Onedrive\DriveItem::getName()
Gets the name of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getDescription
string Krizalys\Onedrive\DriveItem::getDescription()
Gets the description of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getSize
integer Krizalys\Onedrive\DriveItem::getSize()
Gets the size of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getSource
string Krizalys\Onedrive\DriveItem::getSource()
Gets the source link of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getCreatedTime
integer Krizalys\Onedrive\DriveItem::getCreatedTime()
Gets the creation time of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
getUpdatedTime
integer Krizalys\Onedrive\DriveItem::getUpdatedTime()
Gets the last modification time of the OneDrive drive item referenced by this DriveItem instance.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
move
mixed Krizalys\Onedrive\DriveItem::move(null|string $destinationId)
Moves the OneDrive drive item referenced by this DriveItem instance into another OneDrive folder.
$destinationId must refer to a folder.
- Visibility: public
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
- This method is defined by Krizalys\Onedrive\DriveItem
Arguments
- $destinationId null|string - The unique ID of the OneDrive folder into which to move the OneDrive drive item referenced by this
DriveIteminstance, or null to move it to the OneDrive root folder. Default:null.