filesystem
[ class tree: filesystem ] [ index: filesystem ] [ all elements ]

Class: Files

Source Location: /filesystem/Files.class.php

Class Overview


A class to manage files in a filesystemtree.


Author(s):

Version:

  • 0.2.26

Copyright:

  • Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Child classes:

CSVFiles
A class to manage files with comma separated values.
ImageFiles
A class to manage image files in a filesystemtree.
PHPFile
A class to create php-files who using this class-library.
HTMLEmbed

Class Details

[line 47]
A class to manage files in a filesystemtree.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.2.26
copyright:  

Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Variables

$content =  ""

[line 73]



Tags:

access:  public

Type:   string


[ Top ]

$filename =  ""

[line 63]



Tags:

access:  public

Type:   string


[ Top ]

$filesize =  0

[line 68]



Tags:

access:  public

Type:   integer


[ Top ]

$parentfolder =  ""

[line 58]



Tags:

access:  private

Type:   Folder


[ Top ]

$path =  ""

[line 53]



Tags:

access:  public

Type:   string


[ Top ]

$tmp_fh =  ""

[line 80]

Is set if the function saveTmp() has been invoke.



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


static method getExtension [line 181]

static string|false getExtension( string $filename)

Returns the file extension of the given filename.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.2
access:  public


Parameters:

string   $filename  

[ Top ]

constructor Files [line 97]

Files Files( string $path_and_filename, string $path, string $filename)

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $path_and_filename  
string   $path  
string   $filename  

[ Top ]

method deleteTmp [line 422]

boolean deleteTmp( )

Deletes the temporary file of this object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.0
access:  public


[ Top ]

method equals [line 132]

boolean equals( &$img_obj, ImageFiles $img_obj)

Compares the given Files object with this one. If both equal each other it will be returned true, otherwise false. The two file objects will be accounted as equal, if the the filenames and pathes match each other.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.22
access:  public


Parameters:

ImageFiles   $img_obj  
   &$img_obj  

[ Top ]

method get [line 221]

string get( )

Returns the content of this file object. This function is an alias for the function getContent().



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.4
access:  public


Overridden in child classes as:

PHPFile::get()
Returns the source of the generated php-file.
HTMLEmbed::get()
Returns a generated string based on the attributes of this HTML-Object.

[ Top ]

method getContent [line 200]

string &getContent( )

Returns the content of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Overridden in child classes as:

CSVFiles::getContent()
Returns the content of this file object.
ImageFiles::getContent()
Returns the content of this image file object.

[ Top ]

method getFilesize [line 292]

integer getFilesize( )

Sets the content of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.2
access:  public


[ Top ]

method getName [line 165]

string getName( )

Returns the filename of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


[ Top ]

method getPath [line 150]

string getPath( )

Returns the path to the file of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


[ Top ]

method load [line 313]

void load( )

Loads the content of this file object from the filesystem and sets the content to this object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.01
since:  0.1.0
access:  public


[ Top ]

method save [line 385]

void save( )

Saves the file of this object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.01
since:  0.1.1
access:  public


[ Top ]

method saveAs [line 336]

boolean saveAs( string $path, string $file)

Saves the file of this object with given name.

You need to give in the filename at least.




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.12
since:  0.1.0
access:  public


Parameters:

string   $path   Where the file should be stored.
string   $file   Which name the file should get.

[ Top ]

method saveTmp [line 399]

filehandle saveTmp( )

Saves the file of this object in a temporary file.



Tags:

version:  1.02
since:  0.2.0
access:  public


[ Top ]

method setContent [line 255]

void setContent( string $string)

Sets the content of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $string   The content which should be set to the file.

[ Top ]

method setFilesize [line 274]

void setFilesize( integer $filesize)

Sets the content of this file object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Parameters:

integer   $filesize   The size of this file to be set.

[ Top ]

method setParentFolder [line 239]

void setParentFolder( &$objRef, Folder $objRef)

Sets the parent folder of this file object that there is a back reference up to the root of the filesystem tree,



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  protected


Parameters:

Folder   $objRef   The reference to the folder object that contains this file.
   &$objRef  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:11:27 +0200 by phpDocumentor 1.4.1