Skip to content

Instantly share code, notes, and snippets.

@kumavis
Last active December 17, 2015 22:19
Show Gist options
  • Save kumavis/5681595 to your computer and use it in GitHub Desktop.
Save kumavis/5681595 to your computer and use it in GitHub Desktop.
Quick and dirty grab of the node fs attributes used by node-browserify and dependencies. Generated by cloning the repo, npm install, project-wide search for "fs.", grabbing all the words following the period, forming them into a list of strings and dropping them into an irb sesh, calling uniq, sorting, then joining with a newline. Finally, manua…

filesystem-browserify implements: 7 attributes

createReadStream
createWriteStream
readFile
readdir
rename
unlink
writeFile

node-browserify + dependencies utilize: 44 attributes

chown
chownSync
close
closeSync
createReadStream
createWriteStream
exists
existsSync
fchmod
fchmodSync
fchown
fchownSync
futimes
futimesSync
lchmod
lchmodSync
lchown
lchownSync
lstat
lutimes
lutimesSync
mkdir
mkdirSync
open
openSync
party
read
readFile
readFileSync
readSync
readdir
readdirSync
realpathSync
rename
stat
statSync
symlink
unlink
unlinkSync
utimensat
utimensatSync
watch
writeFile
writeFileSync

fs module documented api describes: 67 attributes

appendFile
appendFileSync
chmod
chmodSync
chown
chownSync
close
closeSync
createReadStream
createWriteStream
exists
existsSync
fchmod
fchmodSync
fchown
fchownSync
fstat
fstatSync
fsync
fsyncSync
ftruncate
ftruncateSync
futimes
futimesSync
lchmod
lchmodSync
lchown
lchownSync
link
linkSync
lstat
lstatSync
mkdir
mkdirSync
open
openSync
read
readFile
readFileSync
readSync
readdir
readdirSync
readlink
readlinkSync
realpath
realpathSync
rename
renameSync
rmdir
rmdirSync
stat
statSync
symlink
symlinkSync
truncate
truncateSync
unlink
unlinkSync
unwatchFile
utimes
utimesSync
watch
watchFile
write
writeFile
writeFileSync
writeSync
@kumavis
Copy link
Author

kumavis commented May 30, 2013

times like these i kick myself for not learning regex

@kumavis
Copy link
Author

kumavis commented May 30, 2013

not sure how much of the documented fs module api needs to be implemented for full coverage, as some methods may just call a series of other methods

need a list of the fs module 'metal' api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment