文件描述符是什么?
在nodejs的文档中看到的,百度了一下还是不明白,请大佬帮解释一下。
When file is a file descriptor, the behavior is similar to calling fs.write() directly (which is recommended). See the notes below on using a file descriptor.
文件描述符是什么?
在nodejs的文档中看到的,百度了一下还是不明白,请大佬帮解释一下。
When file is a file descriptor, the behavior is similar to calling fs.write() directly (which is recommended). See the notes below on using a file descriptor.
nodejs file descriptor
On POSIX systems, for every process, the kernel maintains a table of currently open files and resources. Each open file is assigned a simple numeric identifier called a file descriptor. At the system-level, all file system operations use these file descriptors to identify and track each specific file. Windows systems use a different but conceptually similar mechanism for tracking resources. To simplify things for users, Node.js abstracts away the specific differences between operating systems and assigns all open files a numeric file descriptor.
5 回答4.8k 阅读✓ 已解决
4 回答2.5k 阅读✓ 已解决
2 回答1.7k 阅读✓ 已解决
5 回答1.9k 阅读
2 回答1.3k 阅读✓ 已解决
3 回答2k 阅读
1 回答3.2k 阅读
简单的讲,就是一个唯一 ID,通过这个 ID,可以访问该文件,读写该文件