cPanel/DirectoryProtection
cPanel module

DirectoryProtection

1 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="DirectoryProtection", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

list_directories GET#

Return Directory Protection settings

This function returns the leech protection settings of the subdirectories in a directory.

dirstringRequired
The absolute or relative file path in the user's home directory for which to return leech protection information.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

childrenarray<object>
A list of subdirectories and their leech protection information. Note: The function returns a list for each subdirectory in a directory.
pathstring
The subdirectory's absolute directory path.
stateobject
A object containing the subdirectory's leech protection information.
has_leech_protectioninteger
The directory's leech protection status. 1 — Leech protection is enabled. 0 — Leech protection is disabled.
One of: 1 0
currentobject
The user's current directory and its leech protection information.
pathstring
The current directory's absolute file path.
stateobject
An object containing the current directory's leech protection information.
has_leech_protectioninteger
The current directory's leech protection status. 1 — Leech protection is enabled. 0 — Leech protection is disabled.
One of: 1 0
homeobject
The user's home directory and its leech protection information.
pathstring
The home directory's absolute directory path.
stateobject
A object containing the home directory's leech protection information.
has_leech_protectioninteger
The home directory's leech protection status. 1 — Leech protection is enabled. 0 — Leech protection is disabled.
One of: 1 0
parentobject
The parent directory of the current directory and its leech protection information.
pathstring
The parent directory's absolute directory path.
stateobject
An object containing the parent directory's leech protection information.
has_leech_protectioninteger
The parent directory's leech protection status. 1 — Leech protection is enabled. 0 — Leech protection is disabled.
One of: 1 0