suve

awful: function: dir-exists

Available since rev.36 (v.0.5.0).

Declaration

bool :dir-exists ( string $DIRNAME , … )

Summary

Checks if path DIRNAME exists in the filesystem and whether it identifies a directory. Multiple arguments can be used to check against several directories at once. Returns TRUE if all directories exist, or FALSE otherwise.

Example

# :dir-exists example
!if :dir-exists s'config'
    # Load come config files
!else
    :writeln s'Using default settings.'
    :default-settings
!fi

wikipage modified on 2014/0601/2317