StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
RTS
src
SFS
example.C
1
#include <stdio.h>
2
#include "sfs_index.h"
3
4
int
main(
int
argc,
char
*argv[])
5
{
6
if
(argc>=1) {
7
printf(
"Mounting %s\n"
,argv[1]);
8
}
9
else
{
10
return
-1;
11
}
12
13
sfs_index
sfs;
14
15
int
pos=0;
16
17
for
(;;) {
18
int
sz = sfs.getSingleDirSize(argv[1],pos);
19
if
(sz <= 0)
return
-1;
20
21
printf(
"next pos=%d sz=%d\n"
,pos,sz);
22
sfs.mountSingleDir(argv[1],pos);
23
24
fs_dir
*dir = sfs.opendir(
"/"
);
25
if
(dir) {
26
fs_filelist
list;
27
sfs.mem_ls(&list, 1, dir);
28
for
(
int
i=0;i<list.n;i++) {
29
printf(
":::%s\n"
,list.filename[i]);
30
}
31
}
32
33
pos += sz;
34
35
sfs.umount();
36
}
37
}
fs_filelist
Definition:
fs_index.h:86
sfs_index
Definition:
sfs_index.h:129
fs_dir
Definition:
fs_index.h:34
Generated by
1.8.5