An open source application development framework for PHP
This content is released under the MIT License (MIT)
Copyright (c) 2014-2019 British Columbia Institute of Technology
Copyright (c) 2019 CodeIgniter Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Deletes all files contained in the supplied directory path.
Files must be writable or owned by the system in order to be deleted.
If the second parameter is set to true, any directories contained
within the supplied base directory will be nuked as well.
Parameters
string
$path
File path
boolean
$del_dir
Whether to delete any directories found in the path
boolean
$htdocs
Whether to skip deleting .htaccess and index page files
integer
$_level
Current directory depth level (default: 0; internal use only)
Given a file and path, returns the name, path, size, date modified
Second parameter allows you to explicitly declare what information you want returned
Options are: name, server_path, size, date, readable, writable, executable, fileperms
Returns false if the file cannot be found.
Parameters
string
$file
Path to file
mixed
$returned_values
Array or comma separated string of information returned
Returns
array|null
symbolic_permissions()
symbolic_permissions(integer $perms) : string
Symbolic Permissions
Takes a numeric value representing a file's permissions and returns
standard symbolic notation representing that value
Parameters
integer
$perms
Permissions
Returns
string
octal_permissions()
octal_permissions(integer $perms) : string
Octal Permissions
Takes a numeric value representing a file's permissions and returns
a three character string representing the file's octal permissions