\League\Flysystem\AdapterSynologyFtp

Summary

Methods
Properties
Constants
getMetadata()
setTransferMode()
setSsl()
setPassive()
setIgnorePassiveAddress()
setRecurseManually()
setUtf8()
connect()
disconnect()
write()
writeStream()
update()
updateStream()
rename()
delete()
deleteDir()
createDir()
getMimetype()
getTimestamp()
read()
readStream()
setVisibility()
isConnected()
copy()
__construct()
setConfig()
getHost()
setHost()
setPermPublic()
setPermPrivate()
getPort()
getRoot()
setPort()
setRoot()
getUsername()
setUsername()
getPassword()
setPassword()
getTimeout()
setTimeout()
getSystemType()
setSystemType()
setEnableTimestampsOnUnixListings()
listContents()
removeDotDirectories()
has()
getSize()
getVisibility()
ensureDirectory()
getConnection()
getPermPublic()
getPermPrivate()
__destruct()
setPathPrefix()
getPathPrefix()
applyPathPrefix()
removePathPrefix()
No public properties found
No constants found
listDirectoryContents()
setUtf8Mode()
setConnectionPassiveMode()
setConnectionRoot()
login()
createActualDirectory()
listDirectoryContentsRecursive()
isPureFtpdServer()
ftpRawlist()
normalizeListing()
sortListing()
normalizeObject()
normalizeUnixObject()
normalizeUnixTimestamp()
normalizeWindowsObject()
detectSystemType()
detectType()
normalizePermissions()
escapePath()
$transferMode
$ignorePassiveAddress
$recurseManually
$utf8
$configurable
$isPureFtpd
$connection
$host
$port
$ssl
$timeout
$passive
$separator
$root
$permPublic
$permPrivate
$systemType
$safeStorage
$enableTimestampsOnUnixListings
$pathPrefix
$pathSeparator
N/A
getRawExecResponseCode()
No private properties found
N/A

Properties

$transferMode

$transferMode : int

Type

int

$ignorePassiveAddress

$ignorePassiveAddress : null|bool

Type

null|bool

$recurseManually

$recurseManually : bool

Type

bool

$utf8

$utf8 : bool

Type

bool

$configurable

$configurable : array

Type

array

$isPureFtpd

$isPureFtpd : bool

Type

bool

$connection

$connection : mixed

Type

mixed

$host

$host : string

Type

string

$port

$port : int

Type

int

$ssl

$ssl : bool

Type

bool

$timeout

$timeout : int

Type

int

$passive

$passive : bool

Type

bool

$separator

$separator : string

Type

string

$permPublic

$permPublic : int

Type

int

$permPrivate

$permPrivate : int

Type

int

$systemType

$systemType : string

Type

string

$safeStorage

$safeStorage : \League\Flysystem\SafeStorage

Type

SafeStorage

$enableTimestampsOnUnixListings

$enableTimestampsOnUnixListings : bool

True to enable timestamps for FTP servers that return unix-style listings.

Type

bool

$pathPrefix

$pathPrefix : string|null

Type

string|null — path prefix

$pathSeparator

$pathSeparator : string

Type

string

Methods

getMetadata()

getMetadata(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

setTransferMode()

setTransferMode(int  $mode) : $this

Set the transfer mode.

Parameters

int $mode

Returns

$this —

setSsl()

setSsl(bool  $ssl) : $this

Set if Ssl is enabled.

Parameters

bool $ssl

Returns

$this —

setPassive()

setPassive(bool  $passive = true) : mixed

Set if passive mode should be used.

Parameters

bool $passive

Returns

mixed —

setIgnorePassiveAddress()

setIgnorePassiveAddress(bool  $ignorePassiveAddress) : mixed

Parameters

bool $ignorePassiveAddress

Returns

mixed —

setRecurseManually()

setRecurseManually(bool  $recurseManually) : mixed

Parameters

bool $recurseManually

Returns

mixed —

setUtf8()

setUtf8(bool  $utf8) : mixed

Parameters

bool $utf8

Returns

mixed —

connect()

connect() : mixed

Establish a connection.

Returns

mixed —

disconnect()

disconnect() : mixed

Close the connection.

Returns

mixed —

write()

write(mixed  $path, mixed  $contents, \League\Flysystem\Config  $config) : mixed

Parameters

mixed $path
mixed $contents
\League\Flysystem\Config $config

Returns

mixed —

writeStream()

writeStream(string  $path, resource  $resource, \League\Flysystem\Config  $config) : resource

Parameters

string $path
resource $resource
\League\Flysystem\Config $config

Returns

resource —

update()

update(mixed  $path, mixed  $contents, \League\Flysystem\Config  $config) : mixed

Parameters

mixed $path
mixed $contents
\League\Flysystem\Config $config

Returns

mixed —

updateStream()

updateStream(mixed  $path, mixed  $resource, \League\Flysystem\Config  $config) : mixed

Parameters

mixed $path
mixed $resource
\League\Flysystem\Config $config

Returns

mixed —

rename()

rename(mixed  $path, mixed  $newpath) : mixed

Parameters

mixed $path
mixed $newpath

Returns

mixed —

delete()

delete(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

deleteDir()

deleteDir(mixed  $dirname) : mixed

Parameters

mixed $dirname

Returns

mixed —

createDir()

createDir(mixed  $dirname, \League\Flysystem\Config  $config) : mixed

Parameters

mixed $dirname
\League\Flysystem\Config $config

Returns

mixed —

getMimetype()

getMimetype(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

getTimestamp()

getTimestamp(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

read()

read(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

readStream()

readStream(string  $path) : resource

Parameters

string $path

Returns

resource —

setVisibility()

setVisibility(mixed  $path, mixed  $visibility) : mixed

Parameters

mixed $path
mixed $visibility

Returns

mixed —

isConnected()

isConnected() : bool

Check if a connection is active.

Returns

bool —

copy()

copy(string  $path, string  $newpath) : bool

Copy a file.

Parameters

string $path
string $newpath

Returns

bool —

__construct()

__construct(array  $config) : mixed

Constructor.

Parameters

array $config

Returns

mixed —

setConfig()

setConfig(array  $config) : $this

Set the config.

Parameters

array $config

Returns

$this —

getHost()

getHost() : string

Returns the host.

Returns

string —

setHost()

setHost(string  $host) : $this

Set the host.

Parameters

string $host

Returns

$this —

setPermPublic()

setPermPublic(int  $permPublic) : $this

Set the public permission value.

Parameters

int $permPublic

Returns

$this —

setPermPrivate()

setPermPrivate(int  $permPrivate) : $this

Set the private permission value.

Parameters

int $permPrivate

Returns

$this —

getPort()

getPort() : int

Returns the ftp port.

Returns

int —

getRoot()

getRoot() : string

Returns the root folder to work from.

Returns

string —

setPort()

setPort(int|string  $port) : $this

Set the ftp port.

Parameters

int|string $port

Returns

$this —

setRoot()

setRoot(string  $root) : $this

Set the root folder to work from.

Parameters

string $root

Returns

$this —

getUsername()

getUsername() : string

Returns the ftp username.

Returns

string —

username

setUsername()

setUsername(string  $username) : $this

Set ftp username.

Parameters

string $username

Returns

$this —

getPassword()

getPassword() : string

Returns the password.

Returns

string —

password

setPassword()

setPassword(string  $password) : $this

Set the ftp password.

Parameters

string $password

Returns

$this —

getTimeout()

getTimeout() : int

Returns the amount of seconds before the connection will timeout.

Returns

int —

setTimeout()

setTimeout(int  $timeout) : $this

Set the amount of seconds before the connection should timeout.

Parameters

int $timeout

Returns

$this —

getSystemType()

getSystemType() : string

Return the FTP system type.

Returns

string —

setSystemType()

setSystemType(string  $systemType) : $this

Set the FTP system type (windows or unix).

Parameters

string $systemType

Returns

$this —

setEnableTimestampsOnUnixListings()

setEnableTimestampsOnUnixListings(bool  $bool = false) : $this

True to enable timestamps for FTP servers that return unix-style listings.

Parameters

bool $bool

Returns

$this —

listContents()

listContents(mixed  $directory = '', mixed  $recursive = false) : mixed

Parameters

mixed $directory
mixed $recursive

Returns

mixed —

removeDotDirectories()

removeDotDirectories(array  $list) : array

Filter out dot-directories.

Parameters

array $list

Returns

array —

has()

has(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

getSize()

getSize(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

getVisibility()

getVisibility(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

ensureDirectory()

ensureDirectory(string  $dirname) : mixed

Ensure a directory exists.

Parameters

string $dirname

Returns

mixed —

getConnection()

getConnection() : mixed

Returns

mixed —

getPermPublic()

getPermPublic() : int

Get the public permission value.

Returns

int —

getPermPrivate()

getPermPrivate() : int

Get the private permission value.

Returns

int —

__destruct()

__destruct() : mixed

Disconnect on destruction.

Returns

mixed —

setPathPrefix()

setPathPrefix(string  $prefix) : void

Set the path prefix.

Parameters

string $prefix

getPathPrefix()

getPathPrefix() : string|null

Get the path prefix.

Returns

string|null —

path prefix or null if pathPrefix is empty

applyPathPrefix()

applyPathPrefix(string  $path) : string

Prefix a path.

Parameters

string $path

Returns

string —

prefixed path

removePathPrefix()

removePathPrefix(string  $path) : string

Remove a path prefix.

Parameters

string $path

Returns

string —

path without the prefix

listDirectoryContents()

listDirectoryContents(mixed  $directory, mixed  $recursive = false) : mixed

Parameters

mixed $directory
mixed $recursive

Returns

mixed —

setUtf8Mode()

setUtf8Mode() : mixed

Set the connection to UTF-8 mode.

Returns

mixed —

setConnectionPassiveMode()

setConnectionPassiveMode() : mixed

Set the connections to passive mode.

Throws

\League\Flysystem\ConnectionRuntimeException

Returns

mixed —

setConnectionRoot()

setConnectionRoot() : mixed

Set the connection root.

Returns

mixed —

login()

login() : mixed

Login.

Throws

\League\Flysystem\ConnectionRuntimeException

Returns

mixed —

createActualDirectory()

createActualDirectory(string  $directory, resource  $connection) : bool

Create a directory.

Parameters

string $directory
resource $connection

Returns

bool —

listDirectoryContentsRecursive()

listDirectoryContentsRecursive(string  $directory) : mixed

Parameters

string $directory

Returns

mixed —

isPureFtpdServer()

isPureFtpdServer() : bool

Returns

bool —

ftpRawlist()

ftpRawlist(string  $options, string  $path) : array

The ftp_rawlist function with optional escaping.

Parameters

string $options
string $path

Returns

array —

normalizeListing()

normalizeListing(array  $listing, string  $prefix = '') : array

Normalize a directory listing.

Parameters

array $listing
string $prefix

Returns

array —

directory listing

sortListing()

sortListing(array  $result) : array

Sort a directory listing.

Parameters

array $result

Returns

array —

sorted listing

normalizeObject()

normalizeObject(string  $item, string  $base) : array

Normalize a file entry.

Parameters

string $item
string $base

Throws

\League\Flysystem\NotSupportedException

Returns

array —

normalized file array

normalizeUnixObject()

normalizeUnixObject(string  $item, string  $base) : array

Normalize a Unix file entry.

Given $item contains: '-rw-r--r-- 1 ftp ftp 409 Aug 19 09:01 file1.txt'

This function will return: [ 'type' => 'file', 'path' => 'file1.txt', 'visibility' => 'public', 'size' => 409, 'timestamp' => 1566205260 ]

Parameters

string $item
string $base

Returns

array —

normalized file array

normalizeUnixTimestamp()

normalizeUnixTimestamp(string  $month, string  $day, string  $timeOrYear) : int

Only accurate to the minute (current year), or to the day.

Inadequacies in timestamp accuracy are due to limitations of the FTP 'LIST' command

Note: The 'MLSD' command is a machine-readable replacement for 'LIST' but many FTP servers do not support it :(

Parameters

string $month

e.g. 'Aug'

string $day

e.g. '19'

string $timeOrYear

e.g. '09:01' OR '2015'

Returns

int —

normalizeWindowsObject()

normalizeWindowsObject(string  $item, string  $base) : array

Normalize a Windows/DOS file entry.

Parameters

string $item
string $base

Returns

array —

normalized file array

detectSystemType()

detectSystemType(string  $item) : string

Get the system type from a listing item.

Parameters

string $item

Returns

string —

the system type

detectType()

detectType(string  $permissions) : string

Get the file type from the permissions.

Parameters

string $permissions

Returns

string —

file type

normalizePermissions()

normalizePermissions(string  $permissions) : int

Normalize a permissions string.

Parameters

string $permissions

Returns

int —

escapePath()

escapePath(mixed  $path) : mixed

Parameters

mixed $path

Returns

mixed —

getRawExecResponseCode()

getRawExecResponseCode(mixed  $command) : mixed

Parameters

mixed $command

Returns

mixed —