Skip to content

Commit

Permalink
Add dirname module
Browse files Browse the repository at this point in the history
  • Loading branch information
rnjtranjan authored and harendra-kumar committed Jul 23, 2022
1 parent edf66d2 commit a66207c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Streamly/Coreutils/Dirname.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- |
-- Module : Streamly.Coreutils.Dirname
-- Copyright : (c) 2022 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : GHC
--
-- Strip the last component from file name.

module Streamly.Coreutils.Dirname
(dirname)
where

import System.FilePath (takeDirectory)

dirname :: FilePath -> FilePath
dirname = takeDirectory
2 changes: 2 additions & 0 deletions streamly-coreutils.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ library
, time >= 1.9 && < 1.14
, unix >= 2.7.0 && < 2.8
, directory >= 1.2.2 && < 1.4
, filepath >= 1.4 && < 1.5
hs-source-dirs: src
exposed-modules:
Streamly.Coreutils
, Streamly.Coreutils.Common
, Streamly.Coreutils.Cp
, Streamly.Coreutils.Directory
, Streamly.Coreutils.Dirname
, Streamly.Coreutils.Mv
, Streamly.Coreutils.Stat
, Streamly.Coreutils.Mkdir
Expand Down

0 comments on commit a66207c

Please sign in to comment.