Skip to content

Missing and incorrect documentation and specs for atomvm:posix_* functions #2029

@UncleGrumpy

Description

@UncleGrumpy

The documentation for atomvm:posix_write/2 states:

Write data to a file. Files are open non-blocking. ˋatomvm:posix_select_write/3` can be used to determine if the file can be written.

The function ˋatomvm:posix_select_write/3` does not seem to be implemented in posix_nifs.c

Several other nifs in posix_nifs.c are not documented, since these are not standard functions from an OTP module users will have no way of knowing they exist. These functions include:

  • atomvm:posix_closedir/1
  • atomvm:posix_mkfifo/2
  • atomvm:posix_select_read/2
  • atomvm:posix_select_write/2
  • atomvm:posix_select_stop/2
  • atomvm:posix_unlink/1

Also in the atomvm module atomvm:file_get_cwd/0 is lacking documentation.

As well as making the existence of these functions known to users, specs would be beneficial for dialyzer.

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