multicast: New command, uses uftp to multicast annexed files, for eg a classroom setting.
This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
39e8433d46
commit
c3970f6c1a
13 changed files with 454 additions and 2 deletions
|
@ -177,7 +177,10 @@ writeFileProtected file content = writeFileProtected' file
|
|||
(\h -> hPutStr h content)
|
||||
|
||||
writeFileProtected' :: FilePath -> (Handle -> IO ()) -> IO ()
|
||||
writeFileProtected' file writer = withUmask 0o0077 $
|
||||
writeFileProtected' file writer = protectedOutput $
|
||||
withFile file WriteMode $ \h -> do
|
||||
void $ tryIO $ modifyFileMode file $ removeModes otherGroupModes
|
||||
writer h
|
||||
|
||||
protectedOutput :: IO a -> IO a
|
||||
protectedOutput = withUmask 0o0077
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue