Nodejs Fs.open

Source: Internet
Author: User

Fs.open (path, flags, [mode], [Callback (Err, FD)]) are the POSIX open functions
Encapsulation, similar to the fopen function in the C language standard library. It accepts two required parameters, path is the file
Flags can be the following values.
? R: Open the file in read mode.
? r+: Open file in read-write mode.
? W: Open the file in write mode and create if the file does not exist.
? w+: Open the file in read-write mode and create if the file does not exist.
? A: Open the file in Append mode and create if the file does not exist.
? A +: Opens the file in read Append mode and creates if the file does not exist.
The mode parameter assigns permissions to the file when it is created, and defaults to 0666①. The callback function will pass a text
Descriptor Fd②.

Nodejs Fs.open

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.