delfiles
Deleting files and directories by mask. Directories are deleted together with all files and subdirectories. Be really careful while using this function. For example, calling
delfiles( "c:\\temp", $FIND_DIR | $FIND_FILE | $FIND_RECURSE )
will delete all files and directories named temp on the disk N: including a search in all directories. In this case temp is considered a mask and since the flag $FIND_RECURSE is specified, the entire disk C: will be searched. If you just need to delete the directory temp with all its subdirectories and files, you should call
delfiles("c:\\temp", $FIND_DIR )
Calling
delfiles( "c:\\temp\\*.tmp", $FIND_FILE )
will delete all files in the directory tmp leaving subdirectories.
func delfiles (
str name,
uint flag
)
str name,
uint flag
)
Parameters
name | The name of mask for searching. | ||||||||
flag | Search and delete flags.
|
Related links | Source |