API > eden > file.php
View Source

class Eden_File

General available methods for common file manipulations and information per file

Public Methods

public function isFile()

Checks to see if this path is a real file

Returns bool

public function getBase()

Returns the base file name with out the extension

Returns string

public function getContent()

Returns the contents of a file given the path

Arguments

  1. var default value if no file is found

Returns string

public function getData()

Returns the executes the specified file and returns the final value

Returns *

public function getExtension()

Returns the base file name extension

Returns string

public function getFolder()

Returns the file path

Returns string

public function getMime()

Returns the mime type of a file

Returns string

public function getName()

Returns the file name

Returns string

public function getSize()

Returns the size of a file in bytes

Returns string

public function getTime()

Returns the last time file was modified in UNIX time

Returns int

public function setContent($content)

Creates a file and puts specified content into that file

Arguments

  1. string content

Returns bool

public function setData($variable)

Creates a php file and puts specified variable into that file

Arguments

  1. string variable

Returns bool

public function remove()

Removes a file

Returns bool

public function touch()

Touches a file (effectively creates the file if it doesn't exist and updates the date if it does)

Returns bool

class Eden_File_Error

File Errors

Constants

  • PATH_IS_NOT_FILE: Path %s is not a file in the system.

© 2012 Openovate Labs. All rights reserved.