Stud.IP  3.1 Revision 48552
 All Data Structures Namespaces Files Functions Variables Groups Pages
DiskFileStorage Class Reference
Inheritance diagram for DiskFileStorage:
Inheritance graph
Collaboration diagram for DiskFileStorage:
Collaboration graph

Public Member Functions

 __construct ($storage_id=NULL, $user_id=null)
 delete ()
 getPath ()
 exists ()
 getCreationTime ()
 getId ()
 getMimeType ()
 getModificationTime ()
 getSize ()
 isReadable ()
 isWritable ()
 open ($mode)

Static Public Member Functions

static getQuotaUsage ($user_id)
- Static Public Member Functions inherited from FileStorage
static removeFile ($doc_list)

Protected Attributes

 $storage_id
 $file_path

Detailed Description

File.php

Copyright (c) 2013 Elmar Ludwig

Class to represent files on disk (the only supported backend for now).

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.

Constructor & Destructor Documentation

__construct (   $storage_id = NULL,
  $user_id = null 
)

Initialize a new DiskFileStorage object for the given id. A new (empty) file is created of storage_id is NULL.

Parameters
string$storage_idfile id or NULL

Member Function Documentation

delete ( )

Delete this file from disk.

Reimplemented from FileStorage.

Here is the call graph for this function:

exists ( )

Check whether the file exists on disk.

Returns
boolean TRUE or FALSE

Reimplemented from FileStorage.

Here is the caller graph for this function:

getCreationTime ( )

Return the file creation time.

Returns
int timestamp

Reimplemented from FileStorage.

getId ( )

Return the backend id of this file.

Returns
string backend id

Reimplemented from FileStorage.

getMimeType ( )

Return the file's mime type, if known.

Returns
string mime type (NULL if unknown)

Reimplemented from FileStorage.

Here is the call graph for this function:

getModificationTime ( )

Return the file modification time.

Returns
int timestamp

Reimplemented from FileStorage.

getPath ( )
static getQuotaUsage (   $user_id)
static

Here is the call graph for this function:

Here is the caller graph for this function:

getSize ( )

Return the file's size in bytes.

Returns
int file size

Reimplemented from FileStorage.

isReadable ( )

Check if this backend allows reading of files.

Returns
boolean TRUE

Reimplemented from FileStorage.

isWritable ( )

Check if this backend allows writing of files.

Returns
boolean TRUE

Reimplemented from FileStorage.

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

Reimplemented from FileStorage.

Field Documentation

$file_path
protected
$storage_id
protected

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