end2endzone / ShellAnything

ShellAnything is a C++ open-source software which allow one to easily customize and add new options to *Windows Explorer* context menu. Define specific actions when a user right-click on a file or a directory.
MIT License
180 stars 27 forks source link

New property for detecting empty directories #90

Closed end2endzone closed 2 years ago

end2endzone commented 3 years ago

Is your feature request related to a problem? Please describe. Define a property that is set or has a specific value if the clicked directory is empty. This would allow filtering for "empty directories" and only show menus only when the user has clicked on an empty directory.

Describe the solution you'd like The name of the property could be something like selection.dir.empty.

Describe alternatives you've considered N/A

Additional context N/A

end2endzone commented 2 years ago

ShellAnything should provides new properties when user has clicked on a single directory. These properties should provides statistics on the selected directory. The following new properties should be created :

  1. selection.dir.count, matches the number of elements in the selected directory (files and directories).
  2. selection.dir.files.count, matches the number of files in the selected directory.
  3. selection.dir.directories.count, matches the number of directories in the selected directory.
  4. selection.dir.empty, evaluates to true if the selected directory is empty. Evaluates to false otherwise.

A new section in the User Manual should be created to identify these new Directory-based properties.

EDIT: ~A new attribute for Visibility / Validity nodes should be create to allow validation against boolean properties. Suggested names for these new properties are istrue, isfalse. The inverse attribute should also support these new attributes.~ Moved to issue #100.