Files¶
-
class
OCP\
Files
¶ - This class provides access to the internal filesystem abstraction layer. Usethis class exlusively if you want to access files
Source: lib/public/Files.php#51
Methods¶
-
public static
OCP\Files::
rmdirr
($dir)¶ - Recusive deletion of folders
Source: lib/public/Files.php#58 Returns: bool Since: 5.0.0 Deprecated: 14.0.0
-
public static
OCP\Files::
getMimeType
($path)¶ - Get the mimetype form a local file
Source: Parameters: - $path (string)
Returns: string does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead
Since: 5.0.0
Deprecated: 14.0.0
-
public static
OCP\Files::
searchByMime
($mimetype)¶ - Search for files by mimetype
Source: Parameters: - $mimetype (string)
Returns: array
Since: 6.0.0
Deprecated: 14.0.0
-
public static
OCP\Files::
streamCopy
($source, $target)¶ - Copy the contents of one stream to another
Source: Parameters: - $source (resource)
- $target (resource)
Returns: int the number of bytes copied
Since: 5.0.0
Deprecated: 14.0.0
-
public static
OCP\Files::
buildNotExistingFileName
($path, $filename)¶ - Adds a suffix to the name in case the file exists
Source: Parameters: - $path (string)
- $filename (string)
Returns: string
Since: 5.0.0
Deprecated: 14.0.0 use getNonExistingName of the OCP\Files\Folder object
-
public static
OCP\Files::
getStorage
($app)¶ - Gets the Storage for an app - creates the needed folder if they are notexistent
Source: Parameters: - $app (string)
Returns: Since: 5.0.0
Deprecated: 14.0.0 use IAppData instead