Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt

Use this file to discover all available pages before exploring further.

The /api/browse endpoint lets a frontend file-picker traverse the server’s local filesystem one directory level at a time. For each immediate subdirectory it returns the directory name, its absolute path, and a non-recursive count of image files directly inside it. This count gives users a quick indication of which folders contain photos before they select a source or destination directory for a processing job.
GET /api/browse

Query parameters

path
string
Absolute path of the directory to list. Defaults to "/" when the parameter is omitted. If the path does not exist or is not a directory, the endpoint returns an empty array rather than an error.

Response fields

The endpoint returns a JSON array sorted alphabetically (case-insensitive) by directory name. Each element is a DirEntry object:
name
string
required
The directory’s basename, e.g. "2024".
path
string
required
Full absolute path to the directory, e.g. "/home/user/photos/2024".
is_dir
boolean
required
Always true in the current response — only directories are included in the listing.
image_count
integer
required
Number of image files directly inside this directory (non-recursive). The following file extensions are counted, case-insensitively: jpg, jpeg, png, bmp, webp, gif, tiff, tif, heic, heif.
Individual files are never returned — only subdirectories. If you need to know the image count for the directory itself (the path you passed in), sum the image_count values of its children, or issue a separate request to the parent path.

Example

curl 'http://127.0.0.1:8080/api/browse?path=/home/user/photos'
[
  {
    "name": "2023",
    "path": "/home/user/photos/2023",
    "is_dir": true,
    "image_count": 432
  },
  {
    "name": "2024",
    "path": "/home/user/photos/2024",
    "is_dir": true,
    "image_count": 187
  },
  {
    "name": "screenshots",
    "path": "/home/user/photos/screenshots",
    "is_dir": true,
    "image_count": 54
  },
  {
    "name": "wallpapers",
    "path": "/home/user/photos/wallpapers",
    "is_dir": true,
    "image_count": 12
  }
]
Browse the filesystem root
curl 'http://127.0.0.1:8080/api/browse'
[
  {
    "name": "home",
    "path": "/home",
    "is_dir": true,
    "image_count": 0
  },
  {
    "name": "mnt",
    "path": "/mnt",
    "is_dir": true,
    "image_count": 0
  },
  {
    "name": "tmp",
    "path": "/tmp",
    "is_dir": true,
    "image_count": 0
  }
]
To build a recursive tree picker, seed the component with a GET /api/browse call (no path parameter) to list top-level directories, then issue a new request for each directory the user expands. This lazy-loading pattern avoids scanning the entire filesystem on page load.

Build docs developers (and LLMs) love