com\setasign\SetaSite\FileSystem

Native Class Filesystem\Native

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

The native filesystem uses the native php file functions.

Class hierarchy

Implements

Summary

Constants

FILETYPE_DIRECTORY

public const FilesystemInterface::FILETYPE_DIRECTORY = 'directory'

FILETYPE_FILE

public const FilesystemInterface::FILETYPE_FILE = 'file'

Properties

$directory

protected string Native::$directory

$name

protected string Native::$name

$pathName

protected string Native::$pathName

Methods

__construct()

public Native::__construct (
\com\setasign\SetaFramework\Config\Config $config,
string $pathName
)
Parameters
$config : \com\setasign\SetaFramework\Config\Config
 
$pathName : string
 

createDirectory()

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

Throws InvalidPathException

Throws FilesystemException

createFile()

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

Creates a file.

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

Throws FilesystemException

Throws InvalidPathException

delete()

public Native::delete (
string $path
): void

Deletes a file or directory.

Parameters
$path : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException

getAlternativeExternalPath()

public Native::getAlternativeExternalPath (
string $path
): ?string
Parameters
$path : string
 
Exceptions

Throws InvalidPathException

getFile()

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

Throws InvalidPathException

Throws FilesystemException

getFiles()

public Native::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()

public Native::getName (
void
): string

isDirEmpty()

protected Native::isDirEmpty (
string $internalPath,
?array $allowedExtensions = null
): bool
Parameters
$internalPath : string
 
$allowedExtensions : ?array
 

isDirectory()

public Native::isDirectory (
string $path
): bool
Parameters
$path : string
 

isFile()

public Native::isFile (
string $path
): bool
Parameters
$path : string
 

readOptions()

protected Native::readOptions (
\com\setasign\SetaFramework\Config\Config $config
): void
Parameters
$config : \com\setasign\SetaFramework\Config\Config
 

rename()

public Native::rename (
string $path,
string $newPath
): void

Renames a file or directory.

Parameters
$path : string
 
$newPath : string
 
Exceptions

Throws InvalidPathException

Throws FilesystemException