Stud.IP  jlu_3.3 Revision
FileStorage Interface Reference
Inheritance diagram for FileStorage:
Inheritance graph
Collaboration diagram for FileStorage:
Collaboration graph

Public Member Functions

 delete ()
 
 exists ()
 
 getCreationTime ()
 
 getId ()
 
 getMimeType ()
 
 getModificationTime ()
 
 getSize ()
 
 isReadable ()
 
 isWritable ()
 
 open ($mode)
 

Detailed Description

File.php

Common interface for all backends to store files. At the moment, there is only one backend: DiskFileStorage.

Copyright (c) 2013 Elmar Ludwig

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Member Function Documentation

◆ delete()

delete ( )

Delete this file from disk.

Implemented in DiskFileStorage.

◆ exists()

exists ( )

Check whether the file exists on disk.

Returns
boolean TRUE or FALSE

Implemented in DiskFileStorage.

◆ getCreationTime()

getCreationTime ( )

Return the file creation time.

Returns
int timestamp

Implemented in DiskFileStorage.

◆ getId()

getId ( )

Return the backend id of this file.

Returns
string backend id

Implemented in DiskFileStorage.

◆ getMimeType()

getMimeType ( )

Return the file's mime type, if known.

Returns
string mime type (NULL if unknown)

◆ getModificationTime()

getModificationTime ( )

Return the file modification time.

Returns
int timestamp

Implemented in DiskFileStorage.

◆ getSize()

getSize ( )

Return the file's size in bytes.

Returns
int file size

Implemented in DiskFileStorage.

◆ isReadable()

isReadable ( )

Check if this backend allows reading of files.

Returns
boolean TRUE

Implemented in DiskFileStorage.

◆ isWritable()

isWritable ( )

Check if this backend allows writing of files.

Returns
boolean TRUE

Implemented in DiskFileStorage.

◆ open()

open (   $mode)

Open a PHP stream resource for this file. Access mode parameter works just like fopen.

Parameters
string$modeaccess mode (see fopen)
Returns
resource file handle

Implemented in DiskFileStorage.


The documentation for this interface was generated from the following file: