Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

Utilities.empty

Deletes the contents of a folder.

This method has two variants:


Utilities.empty

Recursively deletes the contents within a folder, and then, optionally, the folder itself.

Syntax

Parameters

path
The pathname of the directory whose contents are to be deleted.

bDelete
Specify true to delete the folder itself. Specify false to suppress deleting the folder itself.

Returns

Returns zero (0) on success, or error code on error.

Example

The following code empties the contents of the /tmp directory and any of its subdirectories but does not delete the /tmp itself:


Utilities.empty

Recursively deletes all files which match the chosen pattern from the specified directory tree.

Syntax

Parameters

path
The pathname of the directory whose contents are to be deleted.

pattern
The pattern you want to find and delete.

Returns

Returns zero (0) on success, or error code on error.

 

  Home > Contents > Index >

FatWire JAVA Reference
Copyright 2005 by FatWire Software
All rights reserved.