\duncan3dc\Sonos\UtilsDirectory

Represents a shared directory.

Summary

Methods
Properties
Constants
__construct()
getSharePath()
has()
write()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$filesystem
$share
$directory
N/A

Properties

$filesystem

$filesystem : \League\Flysystem\FilesystemInterface

Type

\League\Flysystem\FilesystemInterface — The full path to the share on the local filesystem.

$share

$share : string

Type

string — The full path to the share (including the hostname).

$directory

$directory : string

Type

string — The name of the directory (to be appended to both $filesystem and $share).

Methods

__construct()

__construct(\League\Flysystem\FilesystemInterface|string  $filesystem, string  $share, string  $directory) 

Create a Directory instance to represent a file share.

Parameters

\League\Flysystem\FilesystemInterface|string $filesystem

The full path to the share on the local filesystem.

string $share

The full path to the share (including the hostname).

string $directory

The name of the directory (to be appended to both $filesystem and $share).

getSharePath()

getSharePath() : string

Get the full path to the directory on the file share.

Returns

string

has()

has(string  $file) : boolean

Check if a file exists.

Parameters

string $file

The path to the file.

Returns

boolean

write()

write(string  $file, string  $contents) : $this

Write data to a file.

Parameters

string $file

The path to the file

string $contents

The contents to write to the file

Returns

$this