6 class frontendHandler (root_dir,slice_name) =
8 method mkentry (rp:relpath) abspath perm =
9 let realperm = perm land (lnot 0o111) in
10 match rp with Relpath(rel) ->
11 let fqp = String.concat "/" [root_dir;rel] in
12 Fifowatcher.mkentry fqp abspath realperm;
13 Fifowatcher.openentry fqp (abspath,slice_name) realperm
15 method mkdir rp perm =
16 match rp with Relpath(rel) ->
17 let fqp = String.concat "/" [root_dir;rel] in
19 let s = Unix.stat fqp in
20 if (s.st_kind<>S_DIR) then
25 else if (s.st_perm <> perm) then
27 printf "Removing directory %s\n" fqp;
28 flush Pervasives.stdout;
32 with Unix.Unix_error(_,_,_) ->
36 match rp with Relpath(rel) ->
37 let fqp1 = String.concat "/" [root_dir;rel;".in"] in
38 let fqp2 = String.concat "/" [root_dir;rel;".out"] in
43 printf "Hm. %s disappeared. Never mind\n" fqp1;flush Pervasives.stdout
46 match rp with Relpath(rel) ->
47 let fqp = String.concat "/" [root_dir;rel] in
51 printf "Hm. %s disappeared. Never mind\n" fqp;flush Pervasives.stdout