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