libparted 3.6
Loading...
Searching...
No Matches
traverse.h
Go to the documentation of this file.
1/*
2 libparted
3 Copyright (C) 1998-2000, 2007-2014, 2019-2023 Free Software Foundation,
4 Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef TRAVERSE_H_INCLUDED
21#define TRAVERSE_H_INCLUDED
22
23#include "fatio.h"
24
26
29 char* dir_name;
30
32 int dirty;
33 int eof;
34
39};
40
42
43/* starts traversal at an arbitary cluster. if start_cluster==0, then uses
44 root directory */
46 FatCluster start_cluster,
47 const char* dir_name);
48
49extern int fat_traverse_complete (FatTraverseInfo* trav_info);
50
52 FatDirEntry* parent);
53
54extern void fat_traverse_mark_dirty (FatTraverseInfo* trav_info);
55
57
59 PedFileSystem* fs);
60
61extern void fat_dir_entry_set_first_cluster (FatDirEntry* dir_entry,
62 PedFileSystem* fs, FatCluster cluster);
63
64extern uint32_t fat_dir_entry_get_length (FatDirEntry* dir_entry);
65
66extern int fat_dir_entry_is_null_term (const FatDirEntry* dir_entry);
67extern int fat_dir_entry_is_file (FatDirEntry* dir_entry);
68extern int fat_dir_entry_is_system_file (FatDirEntry* dir_entry);
69extern int fat_dir_entry_is_directory (FatDirEntry* dir_entry);
70extern void fat_dir_entry_get_name (const FatDirEntry* dir_entry, char* result);
71extern int fat_dir_entry_is_active (FatDirEntry* dir_entry);
72extern int fat_dir_entry_has_first_cluster (FatDirEntry* dir_entry,
73 PedFileSystem* fs);
74
75#endif /* TRAVERSE_H_INCLUDED */
uint32_t FatCluster
Definition: fat.h:41
struct _FatDirEntry FatDirEntry
Definition: fat.h:52
Definition: traverse.h:27
int eof
Definition: traverse.h:33
FatDirEntry * dir_entries
Definition: traverse.h:35
int dirty
Definition: traverse.h:32
PedFileSystem * fs
Definition: traverse.h:28
char * dir_name
Definition: traverse.h:29
FatCluster this_buffer
Definition: traverse.h:37
int current_entry
Definition: traverse.h:36
int is_legacy_root_dir
Definition: traverse.h:31
FatCluster next_buffer
Definition: traverse.h:37
int buffer_size
Definition: traverse.h:38
Structure describing file system.
Definition: filesys.h:68
uint32_t fat_dir_entry_get_length(FatDirEntry *dir_entry)
Definition: traverse.c:273
void fat_dir_entry_get_name(const FatDirEntry *dir_entry, char *result)
Definition: traverse.c:344
int fat_dir_entry_is_null_term(const FatDirEntry *dir_entry)
Definition: traverse.c:279
FatTraverseInfo * fat_traverse_directory(FatTraverseInfo *trav_info, FatDirEntry *parent)
Definition: traverse.c:192
void fat_traverse_mark_dirty(FatTraverseInfo *trav_info)
Definition: traverse.c:117
FatTraverseInfo * fat_traverse_begin(PedFileSystem *fs, FatCluster start_cluster, const char *dir_name)
Definition: traverse.c:123
int fat_dir_entry_is_directory(FatDirEntry *dir_entry)
Definition: traverse.c:314
FatCluster fat_dir_entry_get_first_cluster(FatDirEntry *dir_entry, PedFileSystem *fs)
Definition: traverse.c:230
int fat_traverse_complete(FatTraverseInfo *trav_info)
Definition: traverse.c:179
int fat_dir_entry_is_active(FatDirEntry *dir_entry)
Definition: traverse.c:288
int fat_dir_entry_is_file(FatDirEntry *dir_entry)
Definition: traverse.c:297
int fat_dir_entry_has_first_cluster(FatDirEntry *dir_entry, PedFileSystem *fs)
Definition: traverse.c:323
FatDirEntry * fat_traverse_next_dir_entry(FatTraverseInfo *trav_info)
Definition: traverse.c:205
void fat_dir_entry_set_first_cluster(FatDirEntry *dir_entry, PedFileSystem *fs, FatCluster cluster)
Definition: traverse.c:249
int fat_traverse_entries_per_buffer(FatTraverseInfo *trav_info)
Definition: traverse.c:35
int fat_dir_entry_is_system_file(FatDirEntry *dir_entry)
Definition: traverse.c:306