@@ -10,12 +10,12 @@ import Foreign (Foreign)
10
10
import Foreign as Foreign
11
11
import Node.Buffer (Buffer )
12
12
import Node.Encoding (Encoding (..), encodingToNode )
13
- import Node.FS.Constants (FileFlags (..), fileFlagsToNode )
13
+ import Node.FS.Constants (CopyMode , FileFlags (..), copyFile_NO_FLAGS , fileFlagsToNode )
14
14
import Node.FS.Dirent (Dirent , DirentNameTypeString )
15
15
import Node.FS.Internal.Undefinable (Undefinable )
16
16
import Node.FS.Internal.Undefinable as Undefinable
17
17
import Node.FS.Perms (Perms , all , mkPerms , permsToString , read , write )
18
- import Node.FS.Types (BufferLength , BufferOffset , EncodingString , FileMode , FilePosition )
18
+ import Node.FS.Types (BufferLength , BufferOffset , EncodingString , FilePosition )
19
19
import Node.Path (FilePath )
20
20
21
21
type RmdirOptions = { maxRetries :: Int , retryDelay :: Int }
@@ -254,7 +254,7 @@ type CpOptionsInternal =
254
254
-- if null - will throw "TypeError [ERR_INVALID_ARG_TYPE]: The "options.filter" property must be of type function. Received null"
255
255
, filter :: Undefinable (Fn2 FilePath FilePath Boolean )
256
256
, force :: Boolean
257
- , mode :: FileMode
257
+ , mode :: CopyMode
258
258
, preserveTimestamps :: Boolean
259
259
, recursive :: Boolean
260
260
, verbatimSymlinks :: Boolean
@@ -266,7 +266,7 @@ type CpOptions =
266
266
{ dereference :: Boolean -- Whether to dereference symlinks
267
267
, filter :: Maybe (FilePath -> FilePath -> Boolean )
268
268
, force :: CpForce
269
- , mode :: FileMode -- Modifiers for copy operation
269
+ , mode :: CopyMode -- Modifiers for copy operation
270
270
, preserveTimestamps :: Boolean -- Preserve timestamps from source
271
271
, recursive :: Boolean -- Copy directories recursively
272
272
, verbatimSymlinks :: Boolean -- Skip path resolution for symlinks
@@ -277,7 +277,7 @@ cpOptionsDefault =
277
277
{ dereference: false
278
278
, filter: Nothing
279
279
, force: CpForce_TrueWithoutErrorOnExit
280
- , mode: 0
280
+ , mode: copyFile_NO_FLAGS
281
281
, preserveTimestamps: false
282
282
, recursive: false
283
283
, verbatimSymlinks: false
0 commit comments