Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated filesystem APIs #1

Open
peterflynn opened this issue Nov 9, 2013 · 2 comments
Open

Deprecated filesystem APIs #1

peterflynn opened this issue Nov 9, 2013 · 2 comments

Comments

@peterflynn
Copy link

This extension uses APIs which are deprecated as of Brackets Sprint 34 (the next release):

  • NativeFileSystem.FileEntry
  • DirectoryEntry.getFile() (without create flag)
  • DirectoryEntry.createReader()

These APIs should continue to work for now (though please test your extension to be sure!). However, the deprecated APIs will be removed around the end of this year, so you should migrate away from them soon.

It should be fairly straightforward to migrate to the new APIs. (And if you release an updated extension requiring the new APIs, users of earlier Brackets versions will still be able to install the older release of your extension that is compatible with their build).

See this discussion thread for more background on the API changes.

@peterflynn
Copy link
Author

I also noticed the extension contains this code: FileUtils.showFileOpenError(error.code, filePath). I think this was broken even before the API changes mentioned above (there used to be an error.name field, but I don't think there was ever an error.code). Starting in Brackets Sprint 34 however, the errors are just string constants. So to be compatible with all recent versions of Brackets, you could use this code: FileUtils.showFileOpenError(error.name || error, filePath)

@le717
Copy link
Contributor

le717 commented Nov 15, 2014

@davidderaedt The long-deprecated Brackets NativeFileSystem module reported here will be removed in the very near future, possibly in 1.1. You will need to update your extension on order to preserve future Brackets compatibility.

See adobe/brackets#6127 and adobe/brackets#8751.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants