diff options
| author | Charles.Forsyth <devnull@localhost> | 2007-03-19 11:53:59 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2007-03-19 11:53:59 +0000 |
| commit | 82df8e09f804ed6c924eb96073a69822e60869e9 (patch) | |
| tree | 66f1de70ec8497df3bcc63b051eb57864896fe98 /man | |
| parent | cb97c916bd35d8fd492e26a656f9122b45d0436c (diff) | |
20070319-1153 devsrv
Diffstat (limited to 'man')
| -rw-r--r-- | man/2/styxservers | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/man/2/styxservers b/man/2/styxservers index bf66283b..3ba77131 100644 --- a/man/2/styxservers +++ b/man/2/styxservers @@ -42,6 +42,8 @@ Styxserver: adt { :(ref Fid, string); canwrite: fn(srv: self ref Styxserver, m: ref Tmsg.Write) :(ref Fid, string); + canremove: fn(srv: self ref Styxserver, m: ref Tmsg.Remove) + :(ref Fid, big, string); # fid management getfid: fn(srv: self ref Styxserver, fid: int): ref Fid; @@ -621,7 +623,7 @@ message refers to a valid fid that has been opened for writing, and that the file offset is non-negative. .B Canwrite -returns a tuple, say +returns a tuple .RI ( f ,\ err ); if the attempted access is illegal, .I f @@ -639,6 +641,34 @@ to obtain the .B Fid corresponding to the fid in the message, and check the access. .TP +.IB srv .canremove( m ) +Checks whether the +removal of the file requested by +message +.I m +is legal: the fid is valid, it is not a root directory, and there is write permission +in the parent directory. +.B Canremove +returns a tuple +.RI ( f,\ path,\ err ); +if the attempted access is illegal, +.I f +will be nil and +.I err +contains a description of the error; +otherwise +.I f +contains the +.B Fid +for the file to be removed, and +.I path +is the +.B Qid.path +for the parent directory.The caller should remove the file, and in every case must call +.B srv.delfid +before replying, +because the protocol's remove operation always clunks the fid. +.TP .IB srv .iounit() Return an appropriate value for use as the .I iounit |
