Added basic suporrt for reading files#13
Conversation
|
I see you've moved the file classes into brackets.fs.* These should probably go into bracket.* instead. The "brackets.fs" package is where the low-level file io functions live, and the "fs" name is borrowed from node.js. |
Ty -----Original Message----- I see you've moved the file classes into brackets.fs.* These should probably go into bracket.* instead. The "brackets.fs" package is where the low-level file io functions live, and the "fs" name is borrowed from node.js. Reply to this email directly or view it on GitHub: |
…ample code for file reading in brackets.js. Added unit tests for reading a file (some are currently failing because the underlying implementation isn't finished).
…initial-fileio-work
There was a problem hiding this comment.
Here I think we can default the encoding to UTF-8. The Node file API assumes that an unspecified encoding means "raw". For the HTML file API, it assumes that an unspecified encoding means UTF-8 unless it sees a BOM at the beginning of the file. Since we don't support multiple encodings yet (we have a user story for it later in the backlog), I think it's fine to just default to UTF-8 for now.
Added basic suporrt for reading files -- reviewed by nj
Fix invisible Quick Open dropdown
Added the following shell classes to support file reading
Implemented File() call on FileEntry to get file object to pass to FileReader.readAsText
The basics are now there that we should be able to display the contents of a file in Brackets
Areas I am still working on in this area:
read file error handling
read file unit tests
a more robust event object for FileReader