blob: 062da90567f661813b79c7a50a982cf6789a6435 (
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
39
|
<?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 extends Node
{
/*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;
}
}
}
?>
|