/* Copyright (C) 2008 Emmanuel Varoquaux
This file is part of XOS.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
#ifndef NODE_H
#define NODE_H
#include
struct file_system_struct;
struct device_struct;
void root_init();
/* allocation */
int find_node(struct file_struct *dir, const char *fs_basename, struct file_struct **node);
/* creation et destructions de fichiers dans l'arborescence */
int node_create(const struct file_struct *node, const char *fs_basename);
int node_remove(struct file_struct *node);
int node_mkdir(const struct file_struct *node, const char *fs_basename);
int node_rmdir(const struct file_struct *node);
int node_rename(struct file_struct *node, struct file_struct *dir, const char *fs_basename);
/* divers */
int node_mount(struct file_struct *node, char *device_path, struct device_struct *device, const struct file_system_struct *file_system);
int node_umount(struct file_struct *node);
struct file_struct *node_get_parent(const struct file_struct *node);
int node_is_dir(const struct file_struct *node);
int node_get_name(const struct file_struct *node, char name[]);
int node_get_device(const struct file_struct *node, struct device_struct **device);
#endif