~ubuntu-branches/ubuntu/vivid/parted/vivid

« back to all changes in this revision

Viewing changes to libparted/fs/r/fat/traverse.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-07-21 10:23:16 UTC
  • mfrom: (7.2.32 sid)
  • Revision ID: package-import@ubuntu.com-20140721102316-jsyv3yzmbo8vlde5
Tags: 3.1-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    libparted
 
3
    Copyright (C) 1998-2000, 2007-2012 Free Software Foundation, Inc.
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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/>.
 
17
*/
 
18
 
 
19
#ifndef TRAVERSE_H_INCLUDED
 
20
#define TRAVERSE_H_INCLUDED
 
21
 
 
22
#include "fatio.h"
 
23
 
 
24
typedef struct _FatTraverseInfo         FatTraverseInfo;
 
25
 
 
26
struct _FatTraverseInfo {
 
27
        PedFileSystem*          fs;
 
28
        char*                   dir_name;
 
29
 
 
30
        int                     is_legacy_root_dir;
 
31
        int                     dirty;
 
32
        int                     eof;
 
33
 
 
34
        FatDirEntry*            dir_entries;
 
35
        int                     current_entry;
 
36
        FatCluster              this_buffer, next_buffer;
 
37
        int                     buffer_size;
 
38
};
 
39
 
 
40
extern int fat_traverse_entries_per_buffer (FatTraverseInfo* trav_info);
 
41
 
 
42
/* starts traversal at an arbitary cluster.  if start_cluster==0, then uses
 
43
   root directory */
 
44
extern FatTraverseInfo* fat_traverse_begin (PedFileSystem* fs,
 
45
                                            FatCluster start_cluster,
 
46
                                            const char* dir_name);
 
47
 
 
48
extern int fat_traverse_complete (FatTraverseInfo* trav_info);
 
49
 
 
50
extern FatTraverseInfo* fat_traverse_directory (FatTraverseInfo* trav_info,
 
51
                                                FatDirEntry* parent);
 
52
 
 
53
extern void fat_traverse_mark_dirty (FatTraverseInfo* trav_info);
 
54
 
 
55
extern FatDirEntry* fat_traverse_next_dir_entry (FatTraverseInfo* trav_info);
 
56
 
 
57
extern FatCluster fat_dir_entry_get_first_cluster (FatDirEntry* dir_entry,
 
58
                                                   PedFileSystem* fs);
 
59
 
 
60
extern void fat_dir_entry_set_first_cluster (FatDirEntry* dir_entry,
 
61
                                        PedFileSystem* fs, FatCluster cluster);
 
62
 
 
63
extern uint32_t fat_dir_entry_get_length (FatDirEntry* dir_entry);
 
64
 
 
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,
 
72
                                            PedFileSystem* fs);
 
73
 
 
74
#endif /* TRAVERSE_H_INCLUDED */