Its an alias of disk_free_space() and returns available space on filesystem or disk partition
Example
<?php
echo diskfreespace(“/”);
?>
Output
200833871872
Its an alias of disk_free_space() and returns available space on filesystem or disk partition
Example
<?php
echo diskfreespace(“/”);
?>
Output
200833871872
It returns the total size of a filesystem or disk partition
Example
<?php
echo disk_total_space(“/”);
?>
Output
239940263936
It returns available space on filesystem or disk partition
Example
<?php
echo disk_free_space(“/”);
?>
Output
200834342912
It returns parent directory’s path
Example
<?php
echo dirname(“/var/www”);
?>
Output
/var
Check unlink() or unset()
It can be used to copy file
Example
<?php
copy(“test.txt”,”test.txt.new”) or die(“Failed to copy the file”);
?>
It can be used to clears file status cache
Example
<?php
clearstatcache();
?>
It can be used to change file ownership
Example
<?php
chown(“test.txt”, “phpcodez”);
?>
It can be used to change file permission
Example
<?php
chmod(“/var/www/test/”, 0777);
chmod(“/var/www/test/”, “u+rwx,go+rx”);
?>
It can be used to change file group
Example
<?php
$file = ‘test.txt’;
chgrp($file,”php”);
?>