Skip to content

Which error conditions result in which codes across node supported OSes?

License

Notifications You must be signed in to change notification settings

iarna/filesystem-errorcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filesystem Errorcodes

process.chdir(dir)

  • dir does not exist
    • ENOENT
  • no permission to chdir to dir
    • EACCES

fs.readdir(dir, cb)

  • dir does not exist
    • ENOENT
  • no permission to read dir
    • EACCES

fs.mkdir(dir, cb)

  • dir does not exist
    • ENOENT
  • no permission to create dir
    • EACCES

fs.rmdir(dir, cb)

  • dir does not exist
    • ENOENT
  • no permission to remove dir
    • EACCES

fs.rename(from, to, cb)

  • from is a directory and to exists (WINDOWS)
    • EPERM
  • from and to are directories and to contains files (NON-WINDOWS)
    • ENOTEMPTY
  • can't write to the parent folder of to (WINDOWS)
    • EPERM
  • can't write to the parent folder of to (NON-WINDOWS)
    • EACCES

Assumptions

Currently these tests assume that sync and async functions will produce the same error objects. If this proves ever to not be true we'll split out the tests.

About

Which error conditions result in which codes across node supported OSes?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published