Lua primitives: delete_maildir()
This function will delete an existing Maildir folder, if it is empty.
sent = os.getenv( "HOME" ) .. "/Maildir/.sent" ; if ( is_maildir( sent ) ) then delete_maildir( sent ) end
Deleting a Maildir involves removing four directories:
- The subdirectories: cur, new, & tmp
- The path specified itself.
If any of those directories cannot be deleted, perhaps because they contain files, then the function will return false.
true will be returned on success.
This function has been available since version 0.24.