Class rex_file

Class for handling files.

Package: redaxo\core
Located at redaxo/src/core/lib/util/file.php

Methods summary

public static mixed
# get( string $file, mixed $default = null )

Returns the content of a file.

public static mixed
# getConfig( string $file, mixed $default = [] )

Returns the content of a config file.

public static mixed
# getCache( string $file, mixed $default = [] )

Returns the content of a cache file.

public static boolean
# put( string $file, string $content )

Puts content in a file.

public static boolean
# putConfig( string $file, mixed $content, integer $inline = 3 )

Puts content in a config file.

public static boolean
# putCache( string $file, mixed $content )

Puts content in a cache file.

public static boolean
# copy( string $srcfile, string $dstfile )

Copies a file.

public static boolean
# delete( string $file )

Deletes a file.

public static string
# extension( string $filename )

Extracts the extension of the given filename.

public static string
# formattedSize( string $file, array $format = [] )

Formates the filesize of the given file into a userfriendly form.

public static string
# getOutput( string $file )

Gets executed content of given file.