Encoding

class OC\Files\Storage\Wrapper\Encoding
Encoding wrapper that deals with file names that use unsupported encodings like NFD.
When applied and a UTF-8 path name was given, the wrapper will first attempt to access
the actual given name and then try its NFD form.
Source:lib/private/Files/Storage/Wrapper/Encoding.php#41
Parent:OC\Files\Storage\Wrapper\Wrapper

Properties

Methods

public OC\Files\Storage\Wrapper\Encoding::__construct($parameters)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#51

Parameters:
  • $parameters (array)
public OC\Files\Storage\Wrapper\Encoding::mkdir($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#135

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::rmdir($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#150

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::opendir($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#164

Parameters:
  • $path (string)
Returns:

resource | bool

public OC\Files\Storage\Wrapper\Encoding::is_dir($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#174

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::is_file($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#184

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::stat($path)
only the following keys are required in the result: size and mtime
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#195

Parameters:
  • $path (string)
Returns:

array | bool

public OC\Files\Storage\Wrapper\Encoding::filetype($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#205

Parameters:
  • $path (string)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::filesize($path)
The result for filesize when called on a folder is required to be 0
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#216

Parameters:
  • $path (string)
Returns:

int | bool

public OC\Files\Storage\Wrapper\Encoding::isCreatable($path)
check if a file can be created in $path
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#226

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::isReadable($path)
check if a file can be read
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#236

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::isUpdatable($path)
check if a file can be written to
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#246

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::isDeletable($path)
check if a file can be deleted
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#256

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::isSharable($path)
check if a file can be shared
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#266

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::getPermissions($path)
get the full permissions of a path.
Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#277

Parameters:
  • $path (string)
Returns:

int

public OC\Files\Storage\Wrapper\Encoding::file_exists($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#287

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::filemtime($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#297

Parameters:
  • $path (string)
Returns:

int | bool

public OC\Files\Storage\Wrapper\Encoding::file_get_contents($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#307

Parameters:
  • $path (string)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::file_put_contents($path, $data)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#318

Parameters:
  • $path (string)
  • $data (mixed)
Returns:

int | bool

Source:

lib/private/Files/Storage/Wrapper/Encoding.php#328

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::rename($path1, $path2)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#343

Parameters:
  • $path1 (string)
  • $path2 (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::copy($path1, $path2)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#355

Parameters:
  • $path1 (string)
  • $path2 (string)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::fopen($path, $mode)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#366

Parameters:
  • $path (string)
  • $mode (string)
Returns:

resource | bool

public OC\Files\Storage\Wrapper\Encoding::getMimeType($path)
get the mimetype for a file or folder
The mimetype for a folder is required to be “httpd/unix-directory”
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#381

Parameters:
  • $path (string)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::hash($type, $path, $raw=false)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#393

Parameters:
  • $type (string)
  • $path (string)
  • $raw (bool)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::free_space($path)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#403

Parameters:
  • $path (string)
Returns:

int | bool

public OC\Files\Storage\Wrapper\Encoding::search($query)
search for occurrences of $query in file names
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#413

Parameters:
  • $query (string)
Returns:

array | bool

public OC\Files\Storage\Wrapper\Encoding::touch($path, $mtime=null)
If the backend does not support the operation, false should be returned
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#425

Parameters:
  • $path (string)
  • $mtime (int)
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::getLocalFile($path)
get the path to a local version of the file.
The local version of the file can be temporary and doesn’t have to be persistent across requests
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#436

Parameters:
  • $path (string)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::hasUpdated($path, $time)
check if a file or folder has been updated since $time
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#450

Parameters:
  • $path (string)
  • $time (int)
Returns:

bool hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed. returning true for other changes in the folder is optional

public OC\Files\Storage\Wrapper\Encoding::getCache($path="", $storage=null)
get a cache instance for the storage
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#461

Parameters:
  • $path (string)
Returns:

\OC\Files\Cache\Cache

public OC\Files\Storage\Wrapper\Encoding::getScanner($path="", $storage=null)
get a scanner instance for the storage
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#475

Parameters:
  • $path (string)
Returns:

\OC\Files\Cache\Scanner

public OC\Files\Storage\Wrapper\Encoding::getETag($path)
get the ETag for a file or folder
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#488

Parameters:
  • $path (string)
Returns:

string | bool

public OC\Files\Storage\Wrapper\Encoding::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#498

Parameters:
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath)
Source:

lib/private/Files/Storage/Wrapper/Encoding.php#516

Parameters:
Returns:

bool

public OC\Files\Storage\Wrapper\Encoding::getMetaData($path)
Source:lib/private/Files/Storage/Wrapper/Encoding.php#534
public OC\Files\Storage\Wrapper\Encoding::getDirectoryContent($directory)
Source:lib/private/Files/Storage/Wrapper/Encoding.php#538