Topic: Request: DirMakeEmpty  (Read 186 times)

0 Members and 1 Guest are viewing this topic.

Request: DirMakeEmpty
« on: December 21, 2017, 09:02:25 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7756
DirMake,<Folder>
creates folder....

DirMakeEmpty,<Folder>
create empty folder supporting Junction folders and auto fix in case broken Junction folders
So shortly:
I ask for a replacement to Call,DirDeleteE (http://theoven.org/index.php?topic=45.0)
(download latest Macro Library v43.98 or later from server)


Here is test plugin:
* DirMakeEmpty.Script (13.72 kB - downloaded 15 times.)

Replacing Call,DirDeleteE, to DirMakeEmpty, on test plugin should work for the syntax.

+
Related log request:
Only give Echo info with DirMakeEmpty,
ex:
Echo,"Sucess Empty Folder"
Echo,"Sucess Empty Folder - Fixed to Real Folder (ex: Broken Junction)"

Halt (Error) if Empty folder not created.
Halt (Error) for whatever reason folder is not writable. (In case PEBakery failed fixing Broken Junction of whatever reason behind, make a last write check inside folder)
Halt (Error) If there is any folder or file left ( including empty file folder (Foldersize check is not a good idea )

no Warning.

+
Reason behind:
It will be faster with PEBakery and cleaner log.

+
Syntax name DirMakeEmpty :
All Idea is create writable EmptyFolder.
 If there is other name that fits this idea (just giving example DirMake,Empty,<Folder> ) , let me know.

ps: I always avoid creating new primary syntax names but ied206 wrote it is fine to write such names. Anyway Decision to ied206

Edit:
Just came to my mind, we can replace all Call,DirDeleteMake, http://theoven.org/index.php?topic=45.0
 commands on plugins with a faster DirMakeEmpty,

+
Not urgent, something to keep in mind. Only a Memo or if it takes interest why not.  :wink:

:turtle:
« Last Edit: December 22, 2017, 12:03:27 PM by Lancelot »

Re: Request: DirMakeEmpty
« Reply #1 on: December 21, 2017, 11:09:00 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7756
Added previous post:

Halt (Error) If there is any folder or file left ( including empty file folder (Foldersize check is not a good idea )

Re: Request: DirMakeEmpty
« Reply #2 on: December 22, 2017, 12:04:17 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7756
Added previous post:

Just came to my mind, we can replace all Call,DirDeleteMake, http://theoven.org/index.php?topic=45.0
 commands on plugins with a faster DirMakeEmpty,

:turtle:

 

Powered by EzPortal