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

Class: FilesystemToolkit

Source Location: /filesystem/FilesystemToolkit.class.php

Class Overview


Static Methods


Author(s):

  • Daniel Plücken ( daniel@debakel.net )

Version:

  • 0.1.9

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

Methods



Class Details

[line 63]
Static Methods



Tags:

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


static method copyDir [line 373]

static string copyDir( string $source, string $target)

Copies a directory recursively.



Tags:

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


Parameters:

string   $source   The directory to copy.
string   $target   The target directory for copying.

[ Top ]

static method deleteDir [line 425]

static void deleteDir( string $dir)

Deletes a directory recursively.



Tags:

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


Parameters:

string   $dir   The directory to delete.

[ Top ]

static method getCleanPath [line 77]

static string getCleanPath( string $string)

Removes the last slash in a path if it is on the last position.



Tags:

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


Parameters:

string   $string   The string comprises the path and the filename and which should be slited.

[ Top ]

static method getFileSuffix [line 150]

static string getFileSuffix( string $path)

Returns the suffix of a file. To be returned, the suffix has to have three or four digits and contains only letters (ASCII) and numbers.



Tags:

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


Parameters:

string   $path   The string containing the path to the file to checkout.

[ Top ]

static method getPurePathFromTo [line 207]

static string getPurePathFromTo( string $from, string $to)

Extracs the direct path from one to another folder.

The from-folder is absolut the target-folder is relative. For example you read out links from a htmlsource and you want to follow this links. You know the url of the file's htmlsource and where the links you read out relativly refer to. Then you just should give the url $from and the relative path $to to this function and it will return you the direct url to the links in the htmlsource.




Tags:

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


Parameters:

string   $from  
string   $to  

[ Top ]

static method loadFileContent [line 336]

static string loadFileContent( string $path, string $file)

Loads the content of a given file.



Tags:

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


Parameters:

string   $path   Where the file can be found.
string   $file   The file's name whose content should be loaded.

[ Top ]

static method loadFolderContent [line 259]

static false|array loadFolderContent( string $dir, [string $regExpMatchFiles = ""], [string $regExpMatchFolder = ""], [boolean $filesize = false])

Loads the content of a given folder. Stores file- and foldernmaes in a two dimensional array like as follows:

$out[FILENUMBER]['name'] $out[FILENUMBER]['is_dir'] $out[FILENUMBER]['size'] (if flag $filesize is set)

The output array will be sorted by the filename.




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.2
todo:  Modifying the sort that files and folders will be grouped in the out array
since:  0.1.5
access:  public


Parameters:

string   $dir  
string   $regExpMatchFiles  
string   $regExpMatchFolder  
boolean   $filesize  

[ Top ]

static method removeDir [line 462]

static string removeDir( string $dir)

Deletes a directory recursively. This method is an alias for the method deleteDir()



Tags:

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


Parameters:

string   $dir   The directory to delete.

[ Top ]

static method rewriteDir [line 479]

static string rewriteDir( string $dir)

Rewrites a directory recursively to handle it like it is written by the server user.



Tags:

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


Parameters:

string   $dir   The directory to rewrite.

[ Top ]

static method separatePathAndFile [line 169]

static array separatePathAndFile( string $string)

Separates the path and the filename of each other and returns the splited values in an array. The first entry [0] of the array will be the path and the second entry [1] will be the filename.



Tags:

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


Parameters:

string   $string   The string comprises the path and the filename and which should be slited.

[ Top ]

static method size_readable [line 102]

static void size_readable( int $size, [int $unit = null], [int $retstring = null], [int $si = true])

Return human readable sizes.



Tags:

author:  Aidan Lister <aidan@php.net>
version:  1.1
link:  http://aidanlister.com/repos/v/function.size_readable.php
since:  0.1.9


Parameters:

int   $size   Size
int   $unit   The maximum unit
int   $retstring   The return string format
int   $si   Whether to use SI prefixes

[ Top ]

static method url_exists [line 522]

static string url_exists( string $url)

Checks whether an url can access.



Tags:

author:  Fabrizio (staff at bibivu dot com)
author:  Daniel Plücken <daniel@debakel.net> (only write down here)
version:  1.0
see:  http://www.php.net/manual/en/function.file-exists.php
since:  0.1.8
access:  public


Parameters:

string   $url   The url to proof of existence.

[ Top ]


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