HB_DirUnbuild

HB_DirUnbuild

Attempt to remove a directory

Syntax

      HB_DirUnbuild( <cDir> ) -> <lSuccess>

Argument

<cDir> : The name of the directory to delete

Returns

<lSuccess> : A logical value denotes either <cDir> removed or not

Description

This function attempt to remove the specified directory <cDir> and return .T. if deletion is successfull, else .F.

Note

<cDir> must be empty HB_DirUnbuild() look like a synonym of DirRemove() and HB_DirDelete(); difference is in return value.

Example

      PROC TstDirUnbld()
         LOCAL cDir := 'C:\temp\TstUnB'

         ? 'Is', CDir, 'exists ?    ', HB_DirExists( cDir )   // .T.
         ? 'Is', CDir, 'UnBuilded ? ', HB_DirUnbuild( cDir )  // .F. (*)
         ? 'Is', CDir, 'exists now ?', HB_DirExists( cDir )   // .F.

      RETU // TstDirUnbld()

      (*) observed that <cDir> not found after operation

Seealso

DirRemove(), HB_DirDelete()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s