/* 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 VFAT_TRAVERSE_H #define VFAT_TRAVERSE_H struct vfat_instance_struct; struct vfat_attr_struct; struct calendar_time_struct; int vfat_traverse_find(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, const char *fs_basename, unsigned long *id, int *type); int vfat_traverse_read_dir(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, unsigned long pos, char *fs_buf, unsigned int count); int vfat_traverse_collide(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, const unsigned char basename[]); int vfat_traverse_clear_dir(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key); int vfat_traverse_is_empty(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key); int vfat_traverse_match(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, const char *fs_basename); int vfat_traverse_get_name(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, char name[]); int vfat_traverse_get_attr(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, struct vfat_attr_struct *attr); int vfat_traverse_set_attr(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, const struct vfat_attr_struct *attr); int vfat_traverse_prepare_write_name(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, unsigned long *tot_dir_ent_count, const char *fs_basename, unsigned int needed_free_dir_ent_count, unsigned long *free_dir_ent_key); int vfat_traverse_write_name(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, const unsigned short longname[], const unsigned char shortname[], const struct vfat_attr_struct *attr); int vfat_traverse_clear_name(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key); int vfat_traverse_write_dot_dotdot(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, unsigned long first_cluster, unsigned long parent_first_cluster, const struct calendar_time_struct *ctime, const struct calendar_time_struct *adate, const struct calendar_time_struct *mtime); int vfat_traverse_update_dotdot(struct vfat_instance_struct *vfat_instance, unsigned long dir_ent_key, unsigned long first_cluster); int vfat_traverse_read(struct vfat_instance_struct *vfat_instance, unsigned long file_blk_key, unsigned long pos, char *fs_buf, unsigned int count); int vfat_traverse_write(struct vfat_instance_struct *vfat_instance, unsigned long file_blk_key, unsigned long pos_zeros, unsigned long pos, const char *fs_buf, unsigned int count); #endif