Nextcloud PHP API (master)

ISimpleFile

This interface allows to manage simple files.

This interface must not be implemented in your application but instead should be used as a service and injected in your code with dependency injection.

Tags
since
11.0.0

Table of Contents

Methods

delete()  : void
Delete the file
getContent()  : string
Get the content
getETag()  : string
Get the ETag
getExtension()  : string
getMimeType()  : string
Get the MimeType
getMTime()  : int
Get the last modification time
getName()  : string
Get the name
getSize()  : int|float
Get the size in bytes
putContent()  : void
Overwrite the file
read()  : resource|false
Open the file as stream for reading, resulting resource can be operated as stream like the result from php's own fopen
write()  : resource|bool
Open the file as stream for writing, resulting resource can be operated as stream like the result from php's own fopen

Methods

getETag()

Get the ETag

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

getExtension()

public getExtension() : string
Tags
since
24.0.0
Return values
string

getMimeType()

Get the MimeType

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

getMTime()

Get the last modification time

public getMTime() : int
Tags
since
11.0.0
Return values
int

getName()

Get the name

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

getSize()

Get the size in bytes

public getSize() : int|float
Tags
since
11.0.0
Return values
int|float

read()

Open the file as stream for reading, resulting resource can be operated as stream like the result from php's own fopen

public read() : resource|false
Tags
throws
NotPermittedException
since
14.0.0
Return values
resource|false

write()

Open the file as stream for writing, resulting resource can be operated as stream like the result from php's own fopen

public write() : resource|bool
Tags
throws
NotPermittedException
since
14.0.0
Return values
resource|bool

        
On this page

Search results