Nextcloud PHP API (master)

ISimpleFolder

Interface ISimpleFolder

Tags
since
11.0.0

Table of Contents

Methods

delete()  : void
Remove the folder and all the files in it
fileExists()  : bool
Check if a file with $name exists
getDirectoryListing()  : array<string|int, ISimpleFile>
Get all the files in a folder
getFile()  : ISimpleFile
Get the file named $name from the folder
getFolder()  : ISimpleFolder
Get the folder named $name from the current folder
getName()  : string
Get the folder name
newFile()  : ISimpleFile
Creates a new file with $name in the folder
newFolder()  : ISimpleFolder
Creates a new folder with $name in the current folder

Methods

fileExists()

Check if a file with $name exists

public fileExists(string $name) : bool
Parameters
$name : string
Tags
since
11.0.0
Return values
bool

getDirectoryListing()

Get all the files in a folder

public getDirectoryListing() : array<string|int, ISimpleFile>
Tags
since
11.0.0
Return values
array<string|int, ISimpleFile>

getName()

Get the folder name

public getName() : string
Tags
since
11.0.0
Return values
string

newFile()

Creates a new file with $name in the folder

public newFile(string $name[, string|resource|null $content = null ]) : ISimpleFile
Parameters
$name : string
$content : string|resource|null = null

@since 19.0.0

Tags
throws
NotPermittedException
since
11.0.0
Return values
ISimpleFile

        
On this page

Search results