User Tools

Site Tools


uphp:functions:rmdir

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uphp:functions:rmdir [2017/05/09 13:44]
jeff created
uphp:functions:rmdir [2021/09/13 05:57] (current)
Line 24: Line 24:
 <html><b><span style="color:blue">$pathname<span style="color:black"></b></html>:  The directory path.  Using a ''/'' at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by [[chdir()]]. <html><b><span style="color:blue">$pathname<span style="color:black"></b></html>:  The directory path.  Using a ''/'' at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by [[chdir()]].
  
-<html><b><span style="color:blue">$delete_contents<span style="color:black"></b></html>:+<html><b><span style="color:blue">$delete_contents<span style="color:black"></b></html>:  Optional
   ***0** - The function will fail if the folder is not empty.  (This is the default if this parameter is not specified).     ***0** - The function will fail if the folder is not empty.  (This is the default if this parameter is not specified).  
   ***1** - The function will force deletion of everything below the path.   ***1** - The function will force deletion of everything below the path.
Line 30: Line 30:
 <alert type="warning">**WARNING**:  Setting <html><b><span style="color:blue">$delete_contents<span style="color:black"></b></html> to **1** will cause all files and subdirectories to be removed!</alert> <alert type="warning">**WARNING**:  Setting <html><b><span style="color:blue">$delete_contents<span style="color:black"></b></html> to **1** will cause all files and subdirectories to be removed!</alert>
  
-====Return Value====+====Return Values====
  
 <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  0 on success or -1 on failure <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  0 on success or -1 on failure
Line 48: Line 48:
  
 [[mkdir()]] - Make a directory [[mkdir()]] - Make a directory
 +
 +[[unlink()]] - Remove a file (delete it)
  
uphp/functions/rmdir.1494337445.txt.gz · Last modified: 2021/09/13 05:56 (external edit)