humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
Changelog
list_files
list_files($server,$folder=""); - FTPФункция на вход принимает параметры:
:
Пример использования
<?php // Scenario: List files in a directory on a WebDAV server $xhe_host = getenv("RPABOT_HOST_URL"); if (!isset($path)) { // Path to the init.php file for connecting to the XHE API $path = "../../../Templates/init.php"; // Including init.php grants access to all classes and functionality for working with the XHE API require($path); } // Start echo "\n<font color=blue>webdav->" . basename(__FILE__) . "</font>\n"; // Account credentials $server = "https://webdav.yandex.ru"; $login = "xxx@yandex.ru"; $password = "xxx"; // Step: Connect to WebDAV server echo "1. Connect to server: " . $server . " : "; $connectResult = WEB::$webdav->connect($server, $login, $password); echo $connectResult . "\n"; // Example 1: List files in root directory echo "\n\nExample 1: List files in root directory\n"; $directoryPath = "."; echo "2. List files in root directory:\n"; $filesList = WEB::$webdav->list_files($server, $directoryPath); print_r($filesList); // Step: Disconnect from all servers echo "\n3. Disconnect from all servers: "; $disconnectResult = WEB::$webdav->disconnect_all(); echo $disconnectResult . "\n"; // End echo "\n"; // Quit the application WINDOW::$app->quit();
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7035" from xweb_human_emulator import * # начало echo("<hr><font color=blue>ftp.xxxxxxxxx</font><hr>") # аккаунт server = "https://webdav.yandex.ru"; login = "xxx@yandex.ru"; password = "xxx"; # 1 echo("1. Соединится с сервером : "+server+" : "); echo(webdav.connect(server,login,password),"<br>"); # 2 echo("2. Получим список файлов в корневой папке : \n"); echo(webdav.list_files(server,"Марина")); # 3 echo("\n3. Отсоединится от всех серверов : "); echo(webdav.disconnect_all()); # конец echo("<hr><br>") # Quit app.quit()
#region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program:XHEScript { static void Main(string[] args) { // init XHE XHEScript.server = Environment.GetEnvironmentVariable("RPABOT_HOST_URL"); InitXHE(); // начало echo("<hr><font color=blue>ftp.create_directory</font><hr>"); // аккаунт var server = "https://webdav.yandex.ru"; var login = "xxx@yandex.ru"; var password = "xxx"; // 1 echo("1. Соединится с сервером : "+server+" : "); echo(webdav.connect(server,login,password)+"<br>"); // 2 echo("2. Получим список файлов в корневой папке : \n"); echo(webdav.list_files(server,".")); // 3 echo("3. Отсоединится от всех серверов : "); echo(webdav.disconnect_all()); // конец echo("\n\n"); app.quit(); } }
// подключим функциональные объекты, если еще не подключен xhe_host="127.0.0.1:7028"; echo=require("../../../Templates JS/init.js"); // начало echo("<hr><font color=blue>ftp.create_directory</font><hr>"); // аккаунт server = "https://webdav.yandex.ru"; login = "xxx@yandex.ru"; password = "xxx"; // 1 echo("1. Соединится с сервером : "+server+" : "); echo(webdav.connect(server,login,password)+"<br>"); // 2 echo("2. Получим список файлов в корневой папке : \n"); echo(webdav.list_files(server,".")); // 3 echo("3. Отсоединится от всех серверов : "); echo(webdav.disconnect_all()); // конец echo("\n"); // Quit app.quit();
=============================================
webdav Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.