{-# LANGUAGE CPP #-}

module Cardano.CLI.IO.Compat
  ( posixSetOtherAndGroupModes
  ) where

#if !defined(mingw32_HOST_OS)
#define UNIX
#endif

#ifdef UNIX
import           System.Posix.Files
#endif

posixSetOtherAndGroupModes :: IO ()
posixSetOtherAndGroupModes :: IO ()
posixSetOtherAndGroupModes = do
#ifdef UNIX
  FileMode
_ <- FileMode -> IO FileMode
setFileCreationMask (FileMode
otherModes FileMode -> FileMode -> FileMode
`unionFileModes` FileMode
groupModes)
#endif

  () -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ()