aboutsummaryrefslogtreecommitdiff
path: root/lib/Daffm/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Daffm/Types.hs')
-rw-r--r--lib/Daffm/Types.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Daffm/Types.hs b/lib/Daffm/Types.hs
new file mode 100644
index 0000000..2a8e97d
--- /dev/null
+++ b/lib/Daffm/Types.hs
@@ -0,0 +1,29 @@
+module Daffm.Types where
+
+import qualified Brick.Widgets.List as L
+import System.Posix.Types (FileOffset)
+
+data FileType
+ = RegularFile
+ | BlockDevice
+ | CharacterDevice
+ | NamedPipe
+ | Directory
+ | SymbolicLink
+ | UnixSocket
+ deriving (Show)
+
+data FileInfo = FileInfo
+ { fileName :: String,
+ filePath :: FilePath,
+ fileSize :: FileOffset,
+ fileType :: FileType
+ }
+ deriving (Show)
+
+data AppState = AppState
+ { stateFiles :: L.List () FileInfo,
+ stateCwd :: FilePath,
+ stateParentDir :: FilePath
+ }
+ deriving (Show)