cPanel API 1 Functions - Fileman::listfiles

Description

This function lists a directory's files, permissions, and some display options.

Warning:

cPanel API 1 is deprecatedDo not use this function. Instead, we strongly recommend that you use the following newer functions:

Examples


 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
$list_files $cpanel->api1('Fileman''listfiles'array('public_html''1', select.html', 'seldir.html', '0')); // Call the function.

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $list_files $cpliveapi->api1('Fileman''listfiles' ['public_html''1'select.html', 'seldir.html', '0']); # Call the function.

 cPanel Tag System (deprecated)

<cpanel Module="Fileman::fmsavefile ( $FORM('dir','chooser','select','dirselect','usesameframe'))">

 Command Line

cpapi1 --user=username Fileman fmsavefile dir=public_html chooser=1 select=select.html dirselect=seldir.html usesameframe=0

 

Notes:

  • You must URI-encode these values.
  • username represents your account-level username.

 Output (HTML)

Parameters

Parameter

Type

Description

Possible values

Example

 dir

 string

 The files' directory.

 This value defaults to /home.

 Any valid directory.

 /user

 chooser

 Boolean

 Required

 Whether to print extra links to upload files, and create files and new folders. 

  • 0 — Print files with extra links.
  • 1 — Print files without extra links.

 1

 select

 string

 The file's arguments to link to a specified HTML page.

 This value defaults to select.html.

 Any valid filename.

 select.html

 dirselect

 string

 Required

 The HTML page to which to send the specified files' arguments.

 Any valid HTML page name.

 seldir.html

 usesameframe

 Boolean 

 Required

 Whether to create links that open selected files in a new browser window.

  • 0 — Create links that open selected files in a new window.
  • 1 — Create links that open selected files in the same window.

 1

 

Returns

This function returns the specified directory's files, permissions, and display options in HTML format.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....