From 0c3d535a341dcefd702982715f6d20275a0f512d Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 12 Feb 2021 16:40:24 +0200 Subject: stuff --- php/node.php | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'php/node.php') diff --git a/php/node.php b/php/node.php index 6e00a4b..62b9ad2 100644 --- a/php/node.php +++ b/php/node.php @@ -1,26 +1,31 @@ node_id=$node_id; + return NULL; } - } - class Directory_Node extends Node - { - public $node_list; - /*the path in terms of the simulated filesystem*/ - function __construct(string $abstract_path) + if($component=strtok($abstract_path,"/")==false) + { + return NULL; + } + $current_dir=$database->get_node($component,$user->home_directory); + if($current_dir==NULL) + return NULL; + /*traverse path*/ + while($component=strtok("/")) { + $current_dir=get_node($component,$current_dir); + if($current_dir==NULL) + return NULL; } + return get_links_of(NULL,$current_dir); } ?> -- cgit v1.2.3