vfs: Make file handles compatible with OS

* Implement directory handles
  * Unify OpenFile
  * Add all the methods to match *os.File
  * Add StatParent and Rename methods to VFS
This commit is contained in:
Nick Craig-Wood
2017-10-29 21:11:17 +00:00
parent 3e0c91ba4b
commit a5dc62f6c1
5 changed files with 243 additions and 0 deletions

View File

@ -19,6 +19,7 @@ const (
ESPIPE
EBADF
EROFS
ENOSYS
)
// Errors which have exact counterparts in os
@ -33,6 +34,7 @@ var errorNames = []string{
ESPIPE: "Illegal seek",
EBADF: "Bad file descriptor",
EROFS: "Read only file system",
ENOSYS: "Function not implemented",
}
// Error renders the error as a string