File/functions/file_functions.php

Description

CodeIgniter

An open source application development framework for PHP 4.3.2 or newer

Functions
delete_files (line 117)

Delete Files

Deletes all files contained in the supplied directory path. Files must be writable or owned by the system in order to be deleted. If the second parameter is set to TRUE, any directories contained within the supplied base directory will be nuked as well.

  • access: public
bool delete_files (string $path, [bool $del_dir = FALSE], [ $level = 0])
  • string $path: path to file
  • bool $del_dir: whether to delete any directories found in the path
  • $level
get_filenames (line 162)

Get Filenames

Reads the specified directory and builds an array containing the filenames. Any sub-folders contained within the specified path are read as well.

  • access: public
array get_filenames (string $source_dir, [bool $include_path = FALSE])
  • string $source_dir: path to source
  • bool $include_path: whether to include the path as part of the filename
read_file (line 38)

Read File

Opens the file specfied in the path and returns it as a string.

  • access: public
string read_file (string $file)
  • string $file: path to file
write_file (line 85)

Write File

Writes data to the file specified in the path. Creates a new file if non-existent.

  • access: public
bool write_file (string $path, string $data, [ $mode = 'wb'])
  • string $path: path to file
  • string $data: file data
  • $mode

Documentation generated on Tue, 22 Nov 2011 13:28:55 -0200 by phpDocumentor 1.4.3