class DropboxFile (View source)

DropboxFile

Properties

protected string $path Path of the file to upload
protected int $maxLength The maximum bytes to read. Defaults to -1 (read all the remaining buffer).
protected int $offset Seek to the specified offset before reading.
protected resource $stream File Stream

Methods

__construct(string $filePath, int $maxLength = -1, int $offset = -1)

Create a new DropboxFile instance

__destruct()

Closes the stream when destructed.

void
open()

Opens the File Stream

resource
getStream()

Get the Open File Stream

close()

Close the file stream

string
getContents()

Return the contents of the file

string
getFileName()

Get the name of the file

string
getFilePath()

Get the path of the file

int
getSize()

Get the size of the file

string
getMimetype()

Get mimetype of the file

boolean
isRemoteFile(string $pathToFile)

Returns true if the path to the file is remote

Details

at line line 50
__construct(string $filePath, int $maxLength = -1, int $offset = -1)

Create a new DropboxFile instance

Parameters

string $filePath Path of the file to upload
int $maxLength Max Bytes to read from the file
int $offset Seek to specified offset before reading

Exceptions

DropboxClientException

at line line 62
__destruct()

Closes the stream when destructed.

at line line 74
void open()

Opens the File Stream

Return Value

void

Exceptions

DropboxClientException

at line line 92
resource getStream()

Get the Open File Stream

Return Value

resource

at line line 100
close()

Close the file stream

at line line 112
string getContents()

Return the contents of the file

Return Value

string

at line line 122
string getFileName()

Get the name of the file

Return Value

string

at line line 132
string getFilePath()

Get the path of the file

Return Value

string

at line line 142
int getSize()

Get the size of the file

Return Value

int

at line line 152
string getMimetype()

Get mimetype of the file

Return Value

string

at line line 164
protected boolean isRemoteFile(string $pathToFile)

Returns true if the path to the file is remote

Parameters

string $pathToFile

Return Value

boolean