interface Illuminate / Contracts / Filesystem / Filesystem
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Filesystem

Constants

public

VISIBILITY_PUBLIC string

The public visibility setting.

Default: 'public'
public

VISIBILITY_PRIVATE string

The private visibility setting.

Default: 'private'

Methods

public

exists ( $path ) : bool

Determine if a file exists.

Parameters

  • $path string
public

get ( $path ) : string

Get the contents of a file.

Parameters

  • $path string
public

readStream ( $path ) : resource|null

Get a resource to read the file.

Parameters

  • $path string
public

put ( $path , $contents , $options ) : bool

Write the contents of a file.

Parameters

  • $path string
  • $contents string|resource
  • $options mixed
public

writeStream ( $path , $resource , array $options ) : bool

Write a new file using a stream.

Parameters

  • $path string
  • $resource resource
  • $options array
public

getVisibility ( $path ) : string

Get the visibility for the given path.

Parameters

  • $path string
public

setVisibility ( $path , $visibility ) : bool

Set the visibility for the given path.

Parameters

  • $path string
  • $visibility string
public

prepend ( $path , $data ) : bool

Prepend to a file.

Parameters

  • $path string
  • $data string
public

append ( $path , $data ) : bool

Append to a file.

Parameters

  • $path string
  • $data string
public

delete ( $paths ) : bool

Delete the file at a given path.

Parameters

  • $paths string|array
public

copy ( $from , $to ) : bool

Copy a file to a new location.

Parameters

  • $from string
  • $to string
public

move ( $from , $to ) : bool

Move a file to a new location.

Parameters

  • $from string
  • $to string
public

size ( $path ) : int

Get the file size of a given file.

Parameters

  • $path string
public

lastModified ( $path ) : int

Get the file's last modification time.

Parameters

  • $path string
public

files ( $directory , $recursive ) : array

Get an array of all files in a directory.

Parameters

  • $directory string|null
  • $recursive bool
public

allFiles ( $directory ) : array

Get all of the files from the given directory (recursive).

Parameters

  • $directory string|null
public

directories ( $directory , $recursive ) : array

Get all of the directories within a given directory.

Parameters

  • $directory string|null
  • $recursive bool
public

allDirectories ( $directory ) : array

Get all (recursive) of the directories within a given directory.

Parameters

  • $directory string|null
public

makeDirectory ( $path ) : bool

Create a directory.

Parameters

  • $path string
public

deleteDirectory ( $directory ) : bool

Recursively delete a directory.

Parameters

  • $directory string