Overview

Classes

  • Dropbox\AccessToken
  • Dropbox\AccessType
  • Dropbox\AppInfo
  • Dropbox\AuthInfo
  • Dropbox\Client
  • Dropbox\Config
  • Dropbox\Path
  • Dropbox\RequestToken
  • Dropbox\Token
  • Dropbox\WebAuth
  • Dropbox\WriteMode

Exceptions

  • Dropbox\AppInfoLoadException
  • Dropbox\AuthInfoLoadException
  • Dropbox\DeserializeException
  • Dropbox\Exception
  • Dropbox\Exception_BadRequest
  • Dropbox\Exception_BadResponse
  • Dropbox\Exception_BadResponseCode
  • Dropbox\Exception_InvalidAccessToken
  • Dropbox\Exception_NetworkIO
  • Dropbox\Exception_ProtocolError
  • Dropbox\Exception_RetryLater
  • Dropbox\Exception_ServerError
  • Overview
  • Class
  • Tree

Class Path

Path validation functions.

Final
Namespace: Dropbox
Located at Dropbox/Path.php
Methods summary
public static boolean
# isValid( string $path )

Return whether the given path is a valid Dropbox path.

Return whether the given path is a valid Dropbox path.

Parameters

$path
string
$path The path you want to check for validity.

Returns

boolean
Whether the path was valid or not.
public static boolean
# isValidNonRoot( string $path )

Return whether the given path is a valid non-root Dropbox path. This is the same as Dropbox\Path::isValid() except "/" is not allowed.

Return whether the given path is a valid non-root Dropbox path. This is the same as Dropbox\Path::isValid() except "/" is not allowed.

Parameters

$path
string
$path The path you want to check for validity.

Returns

boolean
Whether the path was valid or not.
public static string|null
# findError( string $path )

If the given path is a valid Dropbox path, return null, otherwise return an English string error message describing what is wrong with the path.

If the given path is a valid Dropbox path, return null, otherwise return an English string error message describing what is wrong with the path.

Parameters

$path
string
$path The path you want to check for validity.

Returns

string|null
If the path was valid, return null. Otherwise, returns an English string describing the problem.
public static string|null
# findErrorNonRoot( string $path )

If the given path is a valid non-root Dropbox path, return null, otherwise return an English string error message describing what is wrong with the path. This is the same as Dropbox\Path::findError() except "/" will yield an error message.

If the given path is a valid non-root Dropbox path, return null, otherwise return an English string error message describing what is wrong with the path. This is the same as Dropbox\Path::findError() except "/" will yield an error message.

Parameters

$path
string
$path The path you want to check for validity.

Returns

string|null
If the path was valid, return null. Otherwise, returns an English string describing the problem.
public static null|string
# getName( string $path )

Return the last component of a path (the file or folder name).

Return the last component of a path (the file or folder name).

Path::getName("/Misc/Notes.txt") // "Notes.txt"
Path::getName("/Misc")           // "Misc"
Path::getName("/")               // null

Parameters

$path
string
$path The full path you want to get the last component of.

Returns

null|string
The last component of $path or null if the given $path was <code>"/"<code>.
Dropbox SDK for PHP API documentation generated by ApiGen 2.8.0