com\setasign\SetaSite\FileSystem

FilesystemManagerInterface

File: /SetaSite/src/FileSystem/FilesystemManagerInterface.php

Implemented in

Implements

Summary

Constants

FILETYPE_DIRECTORY

public const FilesystemInterface::FILETYPE_DIRECTORY = 'directory'

FILETYPE_FILE

public const FilesystemInterface::FILETYPE_FILE = 'file'

FILETYPE_FILESYSTEM

public const FilesystemManagerInterface::FILETYPE_FILESYSTEM = 'filesystem'

Methods

createDirectory()

abstract public FilesystemInterface::createDirectory (
?string $path,
string $directoryName
): void
Parameters
$path : ?string
 
$directoryName : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException

createFile()

abstract public FilesystemInterface::createFile (
?string $path,
\com\setasign\SetaFramework\FileSystem\File $file
): void

Creates a file.

The full filename will be generated by $path + '/' + $file->getFileName().

If the file already exists, it will be overwritten.

Parameters
$path : ?string
 
$file : \com\setasign\SetaFramework\FileSystem\File
 
Exceptions

Throws FilesystemException

Throws InvalidPathException

delete()

abstract public FilesystemInterface::delete (
string $path
): void

Deletes a file or directory.

Parameters
$path : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException

getAlternativeExternalPath()

abstract public FilesystemInterface::getAlternativeExternalPath (
string $path
): ?string
Parameters
$path : string
 
Exceptions

Throws InvalidPathException

getFile()

abstract public FilesystemInterface::getFile (
string $path
): \com\setasign\SetaFramework\FileSystem\File
Parameters
$path : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException

getFiles()

abstract public FilesystemInterface::getFiles (
?string $path = null,
?array $allowedExtensions = null
): array

Returns all files in this directory

Parameters
$path : ?string

The internal path to the directory. Null is the root path.

$allowedExtensions : ?array
 
Exceptions

Throws InvalidPathException

getName()

abstract public FilesystemInterface::getName (
void
): string

isDirectory()

abstract public FilesystemInterface::isDirectory (
string $path
): bool
Parameters
$path : string
 

isFile()

abstract public FilesystemInterface::isFile (
string $path
): bool
Parameters
$path : string
 

isFileSystem()

abstract public FilesystemManagerInterface::isFileSystem (
string $path
): bool

Checks whether the path is a filesystem (a filesystem also counts as directory).

Parameters
$path : string
 

rename()

abstract public FilesystemInterface::rename (
string $path,
string $newPath
): void

Renames a file or directory.

Parameters
$path : string
 
$newPath : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException