1.0.10 • Published 4 years ago

delete-empty-directory v1.0.10

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
4 years ago

Delete-Empty-Directory(DED)

It is an excellent tool to delete empty directory on your computer or server.

Some contents in README.md was not translated from Korean. I'll translate for English.

Korean|한국어


✨ Requirement

  • Node.js: The application requires Node.js as runtime. Before use it, Please install Node.js 12 or greater.(The installation section of this document includes installation for Node.js. So, If you install the application with the following instruction, You do not need to install Node.js. The installation script included this repository will install Node.js automatically.)

🎯 Installation

Windows 10

PS> Invoke-WebRequest -URI https://github.com/donghoony1/Delete-Empty-Directory/archive/master.zip -OutFile .\Delete-Empty-Directory.zip;
PS> Expand-Archive -Path .\Delete-Empty-Directory.zip -DestinationPath .\
PS> Move-Item -Path .\Delete-Empty-Directory-master .\Delete-Empty-Directory
PS> .\installation-windows-10.ps1

Enterprise Linux

  • Amazon Linux 2 (AMI)
  • Amazon Linux (AMI)
  • Fedora
  • RHEL
  • CentOS
$ sudo yum update -y
$ sudo yum install git -y
$ git clone https://github.com/donghoony1/Delete-Empty-Directory.git
$ cd Delete-Empty-Directory
$ ./installation-el.sh
$ ded

Debian

  • Ubuntu
  • Debian
  • Linuxmint
$ sudo apt-get update -y
$ sudo apt-get install git -y
$ git clone https://github.com/donghoony1/Delete-Empty-Directory.git
$ cd Delete-Empty-Directory
$ ./installation-debian.sh
$ ded

🎈 Features

Types

  • GUI
  • CUI
  • RESTful

Functions

  • Scan empty folders
  • Delete empty folders
  • Exceptions

🎲 References

Arguments

-g, --gui

Start with GUI. The GUI can be used through web browsers. If it was used, The DED was started on default web browser. It can not be used with -s, --scan or -d, --delete.

-s, --scan

You can receive all of empty folders in base directory as result through CUI. It can not be used with -g, --gui or -d, --delete. -b or --basedirectory is required to use this argument. -e or --exceptions can be used optional.

-d, --delete

Delete all of empty folders in base directory with GUI. It can not be used with -g, --gui or -s, --scan. -b or --basedirectory is required to use this argument. -e or --exceptions can be used optional.

-b, --basedirectory

Set base directory. If there are some space(blank), It should be covered with ". It can not be used with -g, --gui. This argument should be required with -s, --scan or -d, --delete.

-e, --exceptions

Set JSON file's path which has exceptions. If it was not defined, The application does not except any directories. If there are some space(blank), It should be covered with ". It can not be used with -g, --gui. This argument should be required with -s, --scan or -d, --delete.

-a, --allowremote

It allows to access to HTTP server from remote. It can be used with -g, --gui.

-p, --preventopenbrowser

It prevent to start web browser when the application was started. It can be used with -g, --gui.

Sample of JSON file

[
    "/usr/home/ec2-user/donghoony/projects",
    "/usr/home/ec2-user/donghoony/graphics"
]

This JSON file includes exceptions for the path and their children.

RESTful API

  • Content Type: JSON(application/json)
  • JSON Type: Object
  • Range of access allows: ONLY CONNECTIONS FROM LOCAL

POST /api/getDirectories

Parameters

  • Object
    • String Path: The base directory to scan.
    • Array Exceptions: It includes exceptions.
Example
{
    "Path": "/usr/home/ec2-user",
    "Exceptions": [
        "/usr/home/ec2-user/donghoony/projects",
        "/usr/home/ec2-user/donghoony/graphics"
    ]
}

Result

  • Array
    • Object
      • String Path: The path which has not any file or directory.
      • Boolean Excepted: If the path was excepted by the Exceptions, It is true. Otherwise, false.
Example
[
    {
        "Path": "/usr/home/ec2-user/projects/GitHub/Delete-Empty-Directory/node_modules"
        "Excepted": true
    }
    {
        "Path": "/usr/home/ec2-user/videos/2020. 02. 10. Birthday Party"
        "Excepted": false
    }
]

POST /api/deleteDirectories

Parameters

  • Object
    • String Path: The base directory to scan.
    • Array Exceptions: It includes exceptions.
Example
{
    "Path": "/usr/home/ec2-user",
    "Exceptions": [
        "/usr/home/ec2-user/donghoony/projects",
        "/usr/home/ec2-user/donghoony/graphics"
    ]
}

Result

After delete, It will return result as /api/getDirectories.


🚩 Developers

Dong-Hoon Yoo Developer

  • Email: yoodonghoon01@gmail.com
  • Blog: blog.donghoonyoo.com
  • Roles: Development, Writting the documents in English and Korean.
1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago