3
Copyright (C) 1998-2000, 2007-2012 Free Software Foundation, Inc.
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 3 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef TRAVERSE_H_INCLUDED
20
#define TRAVERSE_H_INCLUDED
24
typedef struct _FatTraverseInfo FatTraverseInfo;
26
struct _FatTraverseInfo {
30
int is_legacy_root_dir;
34
FatDirEntry* dir_entries;
36
FatCluster this_buffer, next_buffer;
40
extern int fat_traverse_entries_per_buffer (FatTraverseInfo* trav_info);
42
/* starts traversal at an arbitary cluster. if start_cluster==0, then uses
44
extern FatTraverseInfo* fat_traverse_begin (PedFileSystem* fs,
45
FatCluster start_cluster,
46
const char* dir_name);
48
extern int fat_traverse_complete (FatTraverseInfo* trav_info);
50
extern FatTraverseInfo* fat_traverse_directory (FatTraverseInfo* trav_info,
53
extern void fat_traverse_mark_dirty (FatTraverseInfo* trav_info);
55
extern FatDirEntry* fat_traverse_next_dir_entry (FatTraverseInfo* trav_info);
57
extern FatCluster fat_dir_entry_get_first_cluster (FatDirEntry* dir_entry,
60
extern void fat_dir_entry_set_first_cluster (FatDirEntry* dir_entry,
61
PedFileSystem* fs, FatCluster cluster);
63
extern uint32_t fat_dir_entry_get_length (FatDirEntry* dir_entry);
65
extern int fat_dir_entry_is_null_term (const FatDirEntry* dir_entry);
66
extern int fat_dir_entry_is_file (FatDirEntry* dir_entry);
67
extern int fat_dir_entry_is_system_file (FatDirEntry* dir_entry);
68
extern int fat_dir_entry_is_directory (FatDirEntry* dir_entry);
69
extern void fat_dir_entry_get_name (const FatDirEntry* dir_entry, char* result);
70
extern int fat_dir_entry_is_active (FatDirEntry* dir_entry);
71
extern int fat_dir_entry_has_first_cluster (FatDirEntry* dir_entry,
74
#endif /* TRAVERSE_H_INCLUDED */