Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • App
  • ButtonInput
  • Cache
  • CheckboxInput
  • ColorInput
  • Conf
  • Controller
  • Crypto
  • DatabaseSessionHandler
  • DatetimeInput
  • DB
  • DBExample
  • DeleteInput
  • Dialogbox
  • EmailInput
  • ErrorHandler
  • Event
  • FileInput
  • FileSystem
  • FloatInput
  • Form
  • FormFieldset
  • FormInput
  • GenericModel
  • GifImage
  • HawkApi
  • HawkUpdater
  • HiddenInput
  • HtmlInput
  • HTTPRequest
  • Icon
  • Image
  • IntegerInput
  • ItemList
  • ItemListField
  • JpegImage
  • Lang
  • Language
  • LeftSidebarTab
  • Less
  • Logger
  • Mail
  • MenuItem
  • Model
  • NoSidebarTab
  • NumberInput
  • ObjectInput
  • Option
  • Panel
  • PasswordInput
  • Permission
  • Plugin
  • PluginInstaller
  • PngImage
  • ProfileQuestion
  • ProfileQuestionValue
  • RadioInput
  • Request
  • Response
  • RightSidebarTab
  • Role
  • RolePermission
  • Route
  • Router
  • SelectInput
  • Session
  • Singleton
  • SubmitInput
  • Tabs
  • TextareaInput
  • TextInput
  • Theme
  • TimeInput
  • Upload
  • User
  • View
  • ViewPlugin
  • Widget
  • WysiwygInput

Traits

  • Utils

Exceptions

  • AppStopException
  • DBExampleException
  • DBException
  • FileSystemException
  • HawkApiException
  • ImageException
  • MailException
  • UploadException
  • ViewException

Class FileSystem

This class has utilities to manage the file system, for missing functions in PHP

Hawk\Singleton
Extended by Hawk\FileSystem
Final
Namespace: Hawk
Package: Utils
Located at FileSystem.php

Methods summary

public array
# getAllFilesInDir( string $dir )

Get all files in a directory, including those beginning by '.'

Get all files in a directory, including those beginning by '.'

Parameters

$dir
The directory to find files into

Returns

array
The list of files matching the pattern
public
# copy( string $source, string $dest )

Equivalent to cp -r

Equivalent to cp -r

Parameters

$source
The source file or directory to copy
$dest
The destination file or directory
public array
# find( string $source, string $pattern, string $type = Hawk\FileSystem::FIND_ANY_TYPE )

Find files by a pattern

Find files by a pattern

Parameters

$source
The directory to search in
$pattern
The pattern to find the files
$type
The type of source to find : 'file', 'dir', 'any'

Returns

array
The list of files or directories found
public boolean,
# remove( string $source )

Remove a directory or a file

Remove a directory or a file

Parameters

$source
The file or directory name to remove

Returns

boolean,
TRUE if the source was removed, else FALSE

Methods inherited from Hawk\Singleton

__construct(), getInstance()

Constants summary

string DS

Directory separator

Directory separator

# DIRECTORY_SEPARATOR
string FIND_FILE_ONLY

Constant to find only files in Filsystem::find

Constant to find only files in Filsystem::find

# 'file'
string FIND_DIR_ONLY

Constant to find only directories in Filsystem::find

Constant to find only directories in Filsystem::find

# 'dir'
string FIND_ANY_TYPE

Constant to find both files and directories in Filsystem::find

Constant to find both files and directories in Filsystem::find

# 'any'

Properties summary

protected static FileSysteme $instance

The filesystem instance

The filesystem instance

#
Hawk - PHP documentation API documentation generated by ApiGen