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