Skip to content

asynchronous fdOpen, fdRead, etc #21

@timbod7

Description

@timbod7

In order to implement this: purescript-deprecated/purescript-node-fs-aff#7, I think these functions:

foreign import fdOpen :: forall eff.
   FilePath -> FileFlags -> Maybe FileMode -> Callback eff FileDescriptor -> Eff (fs :: FS | eff) Unit

foreign import fdRead :: forall eff.
   FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Callback eff ByteCount -> Eff (fs :: FS | eff) Unit

foreign import fdNext :: forall eff.
   FileDescriptor -> Buffer -> Callback eff ByteCount -> Eff (fs :: FS | eff) Unit

foreign import fdWrite :: forall eff.
   FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Callback eff ByteCount -> Eff (fs :: FS | eff) Unit

foreign import fdAppend :: forall eff.
   FileDescriptor -> Buffer -> Callback eff ByteCount -> Eff (fs :: FS | eff) Unit

foreign import fdClose :: forall opts eff.
   FileDescriptor -> Callback eff Unit -> Eff (fs :: FS | eff) Unit

need to be added to Node.FS.Async. Does that sound correct? Do the above types look correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions