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

Class: FilesystemTree

Source Location: /filesystem/FilesystemTree.class.php

Class Overview


A class to managing a filesystemtree.


Author(s):

Version:

  • 0.1.65

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



Class Details

[line 60]
A class to managing a filesystemtree.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.1.65
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

$files =

[line 81]



Tags:

access:  private

Type:   array


[ Top ]

$folder =

[line 76]



Tags:

access:  private

Type:   array


[ Top ]

$name =

[line 71]



Tags:

access:  public

Type:   string


[ Top ]

$path =

[line 66]



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


static method setTree [line 250]

static string setTree( string $dir, &$objRef, [string $regExpMatchFiles = ""], [string $regExpMatchFolder = ""], [boolean $filesize = false], [boolean $handle_known_filetypes = false], object $objRef)

Builds a tree of the filesystem beginning at $dir.



Tags:

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


Parameters:

string   $dir   The base directory from which the filesystem should be build.
object   $objRef   The root object of the tree. It will be this object in most cases.
string   $regExpMatchFiles  
string   $regExpMatchFolder  
boolean   $filesize   With this flag you were able to assign whether the filesizes should also stored in the tree.
boolean   $handle_known_filetypes   For example, images will then put into a ImageFiles object, instead of Files object.
   &$objRef  

[ Top ]

constructor FilesystemTree [line 101]

FilesystemTree FilesystemTree( string $path, [string $regExpMatchFiles = ""], [string $regExpMatchFolder = ""], [boolean $filesize = false], [boolean $handle_known_filetypes = false])

Constructor



Tags:

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


Parameters:

string   $path  
string   $regExpMatchFiles  
string   $regExpMatchFolder  
boolean   $filesize  
boolean   $handle_known_filetypes   For example, images will then put into a ImageFiles object, instead of Files object.

[ Top ]

method echoTree [line 410]

void echoTree( )

Sends a dirty formatted list of this filesystem to the browser.



Tags:

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


[ Top ]

method findFile [line 346]

null|Files &findFile( &$f_obj, &$folder_obj, string $f_obj, string $folder_obj)

Search an Files object in the tree that is equal to the given one. 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.1.47
access:  public


Parameters:

string   $f_obj   The object to find.
string   $folder_obj   The reference used to dig in the filesystem tree. This variable has to be initialized with $this object.
   &$f_obj  
   &$folder_obj  

[ Top ]

method getFilenames [line 153]

array getFilenames( )

Returns the names of files that this->path contains by an array.



Tags:

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


[ Top ]

method getFilesArray [line 203]

array &getFilesArray( )

Returns the file objects of this filesystem tree object in pre-order.



Tags:

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


[ Top ]

method getFoldernames [line 133]

array getFoldernames( )

Returns the names of folder that this->path contains by an array.



Tags:

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


[ Top ]

method getName [line 188]

string getName( )

Returns the foldername of this filsystem tree object.



Tags:

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


[ Top ]

method getPath [line 173]

string getPath( )

Returns the path to the folder of this filesystem object.



Tags:

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


[ Top ]

method getVectorFromTree [line 381]

Vector getVectorFromTree( &$folder_obj, string $folder_obj)

Builds and returns a Vector from the filesystem trees. That means that all files will be in a list, so for example you can operate with next()- and prev()-function to navigate in that list.



Tags:

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


Parameters:

string   $folder_obj   The reference used to dig in the filesystem tree. This variable has to be initialized with $this object.
   &$folder_obj  

[ Top ]


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