aboutsummaryrefslogtreecommitdiffstats
path: root/php/node.php
blob: 3c18519f941aae59e263838b51de7483b6bff1b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php 
require_once "database.php";

	class Node
	{
		public $node_id;
		public $is_directory;
		public $relative_path;
		public $type;
		public $name;
		public $note;
		function __construct($node_id)
		{
			$this->node_id=$node_id;
		}
	}
	class Current_Directory
	{
		/*an array of the dir_ids taken to reach here*/
		public $path;

		function __construct($user_id)
		{
			$this->dir_id=get_home_id($user_id);
			$this->path=[$dir_id];
		}
		function change_directory($directory_id):bool
		{
			global $database;
			if(!$database->is_directory($directory_id))
			{
				return false;
			}
			
		}
	}

?>