Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Added basic suporrt for reading files#13

Merged
njx merged 15 commits into
masterfrom
initial-fileio-work
Dec 16, 2011
Merged

Added basic suporrt for reading files#13
njx merged 15 commits into
masterfrom
initial-fileio-work

Conversation

@tvoliter
Copy link
Copy Markdown
Contributor

Added the following shell classes to support file reading

  • Blob
  • File
  • FileReader

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

@gruehle
Copy link
Copy Markdown
Member

gruehle commented Dec 15, 2011

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.

@tvoliter
Copy link
Copy Markdown
Contributor Author

Thanks Glenn. I just fixed this and did another push into my branch. The file io classes are now in NativeFileSystem so they don't pollute the brackets.fs space. NJ said he'd review and merge into master

Ty

-----Original Message-----
From: Glenn Ruehle [mailto:reply@reply.github.com]
Sent: Wednesday, December 14, 2011 4:38 PM
To: Ty Voliter
Subject: Re: [brackets] Added basic suporrt for reading files (#13)

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:
#13 (comment)

Comment thread src/NativeFileSystem.js Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

njx pushed a commit that referenced this pull request Dec 16, 2011
Added basic suporrt for reading files -- reviewed by nj
@njx njx merged commit f2f2596 into master Dec 16, 2011
zaggino added a commit that referenced this pull request May 10, 2015
Fix invisible Quick Open dropdown
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants