humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
лог изменений
set_normal
set_normal($path,$on=true); - данная функция используется для задания у заданной папки аттрибута NORMALФункция на вход принимает параметры:
После отработки функция возвращает результат своей работы в скрипт :
Пример использования
<?php // Scenario: Demonstrates how to check and set the NORMAL attribute of a folder $xhe_host = "localhost:7010"; // Connect functional objects if not already connected if (!isset($path)){ $path = "../../../Templates/init.php"; require($path); } // info echo "\n<span >folder->" . basename (__FILE__) . "</span>\n"; // Example 1: Reset the NORMAL attribute of a folder echo "\n\n"; // Set variables for resetting normal attribute $folderPath = "test1"; $setAttribute = false; // Reset the NORMAL attribute echo "1. Reset NORMAL attribute of folder '$folderPath': "; $result = SYSTEM::$folder->set_normal($folderPath, $setAttribute); if ($result) { echo "NORMAL attribute reset successfully\n"; } else { echo "Failed to reset NORMAL attribute\n"; } // Example 2: Check if folder has NORMAL attribute echo "\n"; // Set variables for checking normal attribute $folderPath = "test1"; // Check if folder has NORMAL attribute echo "2. Check if folder '$folderPath' has NORMAL attribute: "; $isNormal = SYSTEM::$folder->is_normal($folderPath); if ($isNormal) { echo "Folder is NORMAL\n"; } else { echo "Folder is not NORMAL\n"; } // Example 3: Set the NORMAL attribute of a folder echo "\n"; // Set variables for setting normal attribute $folderPath = "test1"; $setAttribute = true; // Set the NORMAL attribute echo "3. Set NORMAL attribute of folder '$folderPath': "; $result = SYSTEM::$folder->set_normal($folderPath, $setAttribute); if ($result) { echo "NORMAL attribute set successfully\n"; } else { echo "Failed to set NORMAL attribute\n"; } // Example 4: Check again if folder has NORMAL attribute echo "\n"; // Set variables for checking normal attribute again $folderPath = "test1"; // Check again if folder has NORMAL attribute echo "4. Check again if folder '$folderPath' has NORMAL attribute: "; $isNormal = SYSTEM::$folder->is_normal($folderPath); if ($isNormal) { echo "Folder is NORMAL\n"; } else { echo "Folder is not NORMAL\n"; } // Quit the application WINDOW::$app->quit(); ?>
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7010" from xweb_human_emulator import * # начало echo("<hr><font color=blue>folder.xxxxxxxxx</font><hr>") # 1 echo("1. Сбросим атрибут NORMAL у папки test1: " ) echo(folder.set_normal("test1",false),"<br>") # 2 echo("2. Получим атрибут NORMAL у папки test1 : ") if not folder.is_normal("test1"): echo("не NORMAL<br>") # 3 echo("3. Установить атрибут NORMAL у папки test1 : " ) echo(folder.set_normal("test1"),"<br>") # 4 echo("4. Получим атрибут NORMAL у папки test1 : ") echo(folder.is_normal("test1")) # конец 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 server = "localhost:7010"; InitXHE(); // начало echo("<hr><font color=blue>folder.set_normal</font><hr>"); // 1 шаг echo("1. Сбросим аттрибут NORMAL у папки test1: "); echo(folder.set_normal("test1",false)+"<br>"); // 2 шаг echo("2. Получим атрибут NORMAL у папки test1 : "); if (!folder.is_normal("test1")) echo("не NORMAL<br>"); // 3 шаг echo("3. Установить атрибут NORMAL у папки test1 : "); echo(folder.set_normal("test1")+"<br>"); // 4 шаг echo("4. Получим атрибут NORMAL у папки test1 : "); echo(folder.is_normal("test1")); // конец echo("\n\n"); app.quit(); } }
// подключим функциональные объекты, если еще не подключен xhe_host="127.0.0.1:7010"; echo=require("../../../Templates JS/init.js"); // начало echo("<hr><font color=blue>folder.set_normal</font><hr>"); // 1 шаг echo("1. Сбросим атрибут NORMAL у папки test1: "); echo(folder.set_normal("test1",false)+"<br>"); // 2 шаг echo("2. Получим атрибут NORMAL у папки test1 : "); if (!folder.is_normal("test1")) echo("не NORMAL<br>"); // 3 шаг echo("3. Установить атрибут NORMAL у папки test1 : "); echo(folder.set_normal("test1")+"<br>"); // 4 шаг echo("4. Получим атрибут NORMAL у папки test1 : "); echo(folder.is_normal("test1")); // конец echo("\n"); // Quit app.quit();
=============================================
Folder Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.