PHP Classes

File: implementation_class.file.php

Recommend this page to a friend!
  Classes of Jorge D. Silveira   Aboyon File Management   implementation_class.file.php   Download  
File: implementation_class.file.php
Role: Example script
Content type: text/plain
Description: Implementation file, how to use
Class: Aboyon File Management
Manipulate files and directories
Author: By
Last change:
Date: 17 years ago
Size: 643 bytes
 

Contents

Class file image Download
<?
include(YOUR_CLASS_PATH."class.file.php");
$File = new File("the_file.txt");

//Copy to destination
$File->CopyTo("new_folder/destination.txt");

//Rename
$File->rn("new_file_name.php");

//Delete the current file
$File->Delete();

//Create a folder
$File->makeDir("my_folder");

//Open a file and modify the content
$File->OpenFile("w+");
$File->GetContent();
$File->FileContent = "new content of the file";
$File->WriteFile();
$File->CloseFile();

//get a folder content and display it
$File->GetFolderContent("my_folder");

for (
$f=0; $f<count($File->FileList); $f++)
    echo
$File->FileList[$f]."\n<br />"

?>