mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Improve typing for fopen/toTmpFile
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
4393b96542
commit
f974281ac9
3 changed files with 6 additions and 5 deletions
|
|
@ -390,7 +390,7 @@ class Filesystem {
|
|||
/**
|
||||
* get the relative path of the root data directory for the current user
|
||||
*
|
||||
* @return string
|
||||
* @return ?string
|
||||
*
|
||||
* Returns path like /admin/files
|
||||
*/
|
||||
|
|
@ -584,9 +584,10 @@ class Filesystem {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @param string $path
|
||||
* @throws \OCP\Files\InvalidPathException
|
||||
*/
|
||||
public static function toTmpFile($path) {
|
||||
public static function toTmpFile($path): string|false {
|
||||
return self::$defaultInstance->toTmpFile($path);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class File extends Node implements \OCP\Files\File {
|
|||
|
||||
/**
|
||||
* @param string $mode
|
||||
* @return resource
|
||||
* @return resource|false
|
||||
* @throws NotPermittedException
|
||||
* @throws LockedException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ interface File extends Node {
|
|||
* Open the file as stream, resulting resource can be operated as stream like the result from php's own fopen
|
||||
*
|
||||
* @param string $mode
|
||||
* @return resource
|
||||
* @return resource|false
|
||||
* @throws NotPermittedException
|
||||
* @throws LockedException
|
||||
* @since 6.0.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue