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 accessthe 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: Parameters: - $parameters (array)
-
public
OC\Files\Storage\Wrapper\Encoding::
mkdir
($path)¶ -
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
rmdir
($path)¶ -
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
opendir
($path)¶ -
Source: Parameters: - $path (string)
Returns: resource | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
is_dir
($path)¶ -
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
is_file
($path)¶ -
Source: 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: Parameters: - $path (string)
Returns: array | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
filetype
($path)¶ -
Source: 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: Parameters: - $path (string)
Returns: int | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
isCreatable
($path)¶ - check if a file can be created in $path
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
isReadable
($path)¶ - check if a file can be read
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
isUpdatable
($path)¶ - check if a file can be written to
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
isDeletable
($path)¶ - check if a file can be deleted
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
isSharable
($path)¶ - check if a file can be shared
Source: 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: Parameters: - $path (string)
Returns: int
-
public
OC\Files\Storage\Wrapper\Encoding::
file_exists
($path)¶ -
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
filemtime
($path)¶ -
Source: Parameters: - $path (string)
Returns: int | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
file_get_contents
($path)¶ -
Source: Parameters: - $path (string)
Returns: string | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
file_put_contents
($path, $data)¶ -
Source: Parameters: - $path (string)
- $data (mixed)
Returns: int | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
unlink
($path)¶ -
Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
rename
($path1, $path2)¶ -
Source: Parameters: - $path1 (string)
- $path2 (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
copy
($path1, $path2)¶ -
Source: Parameters: - $path1 (string)
- $path2 (string)
Returns: bool
-
public
OC\Files\Storage\Wrapper\Encoding::
fopen
($path, $mode)¶ -
Source: Parameters: - $path (string)
- $mode (string)
Returns: resource | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
getMimeType
($path)¶ - get the mimetype for a file or folderThe mimetype for a folder is required to be “httpd/unix-directory”
Source: Parameters: - $path (string)
Returns: string | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
hash
($type, $path, $raw=false)¶ -
Source: Parameters: - $type (string)
- $path (string)
- $raw (bool)
Returns: string | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
free_space
($path)¶ -
Source: Parameters: - $path (string)
Returns: int | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
search
($query)¶ - search for occurrences of $query in file names
Source: 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: 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: 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: 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: Parameters: - $path (string)
Returns:
-
public
OC\Files\Storage\Wrapper\Encoding::
getScanner
($path="", $storage=null)¶ - get a scanner instance for the storage
Source: Parameters: - $path (string)
Returns:
-
public
OC\Files\Storage\Wrapper\Encoding::
getETag
($path)¶ - get the ETag for a file or folder
Source: Parameters: - $path (string)
Returns: string | bool
-
public
OC\Files\Storage\Wrapper\Encoding::
copyFromStorage
($sourceStorage, $sourceInternalPath, $targetInternalPath)¶ Source: Parameters: - $sourceStorage (
OCP\Files\Storage\IStorage
) - $sourceInternalPath (string)
- $targetInternalPath (string)
Returns: bool
- $sourceStorage (
-
public
OC\Files\Storage\Wrapper\Encoding::
moveFromStorage
($sourceStorage, $sourceInternalPath, $targetInternalPath)¶ Source: Parameters: - $sourceStorage (
OCP\Files\Storage\IStorage
) - $sourceInternalPath (string)
- $targetInternalPath (string)
Returns: bool
- $sourceStorage (
-
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