667
edits
Changes
→Week 2
* Open Source and Code Reading
** [https:truncate*** <code>echo "data" > file</code>*** <code>> file</blog.safia.rocks/post/169466425525/node-module-deep-dive-fs Deep Dive on the node fs module] by [https://blog.safia.rocks/ Safia Abdalla]code>
** <code>fs.truncate()</code>
*** [https://nodejs.org/api/fs.html#fs_fs_truncate_path_len_callback docs]*** [https://github.com/nodejs/node/blob/8a86d9c1cf35fe4f892d483e3673083f5d8f42cf6b7b8276d196ea5a0e6dcee4e63c548b7938e8f4/lib/fs.js node#L618 JS src]*** [http://docs.libuv.org/en/v1.x/fs.js source for html?highlight=truncate#c.uv_fs_ftruncate libuv docs]*** [https://github.com/search?q=truncate+repo%3Anodejs%2Fnode+path%3A%2Ftest+language%3AJavaScript+language%3AJavaScript&type=Code Search results in nodejs/node's test/blob/8a86d9c1cf35fe4f892d483e3673083f5d8f42cf/deps/uv/src/unix/fs.c#L1229 POSIX C src]** directory for JavaScript files including '** Uses [http://man7.org/linux/man-pages/man2/truncate'.2.html ftruncate() system call]*** [https://coveragegithub.com/nodejs.org/coverage-3bdc61d4d194e205node/blob/8a86d9c1cf35fe4f892d483e3673083f5d8f42cf/deps/uv/src/rootwin/fs.jsc#L2318 Windows C src]**** Uses [https://docs.html#L612 Code Coverage for fsmicrosoft.truncatecom/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-ntsetinformationfile NtSetInformationFile() system call]*** [https://github.com/filerjs/filer/blob/master/src/filesystem/implementation.js#L2353 L2375 Filer source for truncate]*** A great blog doing something similar: [https://githubblog.safia.comrocks/filerjspost/filer169466425525/blob/masternode-module-deep-dive-fs Deep Dive on the node fs module and fs.access()] by [https:/tests/spec/fsblog.truncatesafia.spec.js Filer tests for truncaterocks/ Safia Abdalla]
* [[DPS909/OSD600 Winter 2019 Lab 1|Lab 1]]