123456789101112131415161718includeStdlib.Sysletlinux=matchIo.String_path.read_file"/proc/sys/kernel/ostype"|>String.trimwith|"Linux"->true|_->false|exception_->falseletforce_remove=ifwin32then(funfn->tryremovefnwithSys_error_->(* Try to remove the "read-only" attribute, then retry. *)(tryUnix.chmodfn0o666withUnix.Unix_error_->());removefn)elseremove