File

Type
Class
Namespace
Craft
Inherits
Craft\File » Craft\BaseIO
Since
1.0

Class File

See also http://craftcms.com

View source

Protected Properties

PropertyDescription
$pathstring

Public Methods

__construct()

View source

Arguments

Returns

Craft\File

Signature

public Craft\File __construct ( $path )

clear()

Signature

public boolean clear ( )

copy()

View source

Arguments

  • $destination

Returns

boolean

Signature

public boolean copy ( $destination )

delete()

Signature

public boolean delete ( )

getContents()

View source

Arguments

Returns

mixed

Signature

public mixed getContents ( $array = false )

getExtension()

Signature

public string getExtension ( )

getFileName()

View source

Arguments

Returns

mixed

Signature

public mixed getFileName ( $includeExtension = true )

getMD5()

View source

Returns

mixed

Signature

public mixed getMD5 ( )

getMimeType()

Signature

public string getMimeType ( )

getSize()

View source

Returns

mixed

Signature

public mixed getSize ( )

isEmpty()

Signature

public boolean isEmpty ( )

touch()

Signature

public boolean touch ( )

write()

View source

Arguments

  • $contents
  • $append

Returns

boolean

Signature

public boolean write ( $contents, $append )