swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

vfs.delete-directory

 
 

Library: File system utilities (OMVFS)
Import: omvfs.xmd

Declaration

export external function delete-directory
                value string path
        on      value directory on-dir optional
        contents value switch contents optional initial {contents-not-included}

Argument definitions

path
The directory to be deleted
dir
A connected vfs.directory object. It this parameter is specified, the path parameter is interpreted relative to the vfs.directory and must be in URL format.
contents
A switch indicating if the directory contents are to be deleted. The default is that directory contents are not to be deleted (contents-not-included).


Purpose

You can use vfs.delete-directory to remove an existing directory. The following program will remove a directory and all its contents from the local file system.

  import "omvfs.xmd" prefixed by vfs.
  
  process
    vfs.delete-directory "/Program Files/Games/oldVersions"
    contents vfs.contents-included

If you want the contents of the directory to be deleted, you must specify the contents parameter with a value of vfs.contents-included. If vfs.contents-included is not specified, and the directory is not empty, exception VFS305 will be thrown and the directory will not be deleted.

Exceptions

The following exceptions may occur:

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.