Skip to content

Krizalys Onedrive Folder

Christophe Vidal edited this page Aug 4, 2019 · 1 revision

Krizalys\Onedrive\Folder

A proxy to a folder stored on a OneDrive drive.

A Folder instance is a kind of DriveItem which may have child OneDrive items, retrievable using fetchChildDriveItems(), but may not have content.

  • Class name: Folder
  • 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

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

__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 Client instance owning this DriveItem instance.

  • $id null|string - The unique ID of the OneDrive drive item referenced by this DriveItem instance.

  • $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.

fetchDriveItems

array<mixed,\Krizalys\Onedrive\DriveItem> Krizalys\Onedrive\Folder::fetchDriveItems()

Gets the drive items in the OneDrive folder referenced by this Folder instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

fetchChildDriveItems

array<mixed,\Krizalys\Onedrive\DriveItem> Krizalys\Onedrive\Folder::fetchChildDriveItems()

Gets the child drive items in the OneDrive folder referenced by this Folder instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

createFolder

\Krizalys\Onedrive\Folder Krizalys\Onedrive\Folder::createFolder(string $name, null|string $description)

Creates a folder in the OneDrive folder referenced by this Folder instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Arguments

  • $name string - The name of the OneDrive folder to be created.
  • $description null|string - The description of the OneDrive folder to be created, or null to create it without a description. Default: null.

createFile

\Krizalys\Onedrive\File Krizalys\Onedrive\Folder::createFile(string $name, string|resource $content, \Krizalys\Onedrive\mixed[string] $options)

Creates a file in the OneDrive folder referenced by this Folder instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Arguments

  • $name string - The name of the OneDrive file to be created.
  • $content string|resource - The content of the OneDrive file to be created, as a string or handle to an already opened file. In the latter case, the responsibility to close the handle is is left to the calling function. Default: ''.
  • $options Krizalys\Onedrive\mixed[string] - The options. Unused.

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 DriveItem instance, or null to move it to the OneDrive root folder. Default: null.
Clone this wiki locally