Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: Add file descriptor support to *File() funcs #3163

Closed
wants to merge 1 commit into from
Closed

fs: Add file descriptor support to *File() funcs #3163

wants to merge 1 commit into from

Commits on Oct 15, 2015

  1. fs: Add file descriptor support to *File() funcs

    These changes affect the following functions and their synchronous
    counterparts:
    
     * fs.readFile()
     * fs.writeFile()
     * fs.appendFile()
    
    If the first parameter is a uint32, it is treated as a file descriptor.
    In all other cases, the original implementation is used to ensure
    backwards compatibility. File descriptor ownership is never taken from
    the user.
    
    The documentation was adjusted to reflect these API changes. A note was
    added to make the user aware of file descriptor ownership and the
    conditions under which a file descriptor can be used by each of these
    functions.
    
    Tests were extended to test for file descriptor parameters under the
    conditions noted in the relevant documentation.
    jwueller committed Oct 15, 2015
    Configuration menu
    Copy the full SHA
    f8ff0a6 View commit details
    Browse the repository at this point in the history