Deprecate Z.File.getBinaryContents

This commit is contained in:
Sylvester Keil 2018-08-03 22:37:09 +02:00
parent 37412c68ff
commit a8dce25cef
No known key found for this signature in database
GPG key ID: 878933BCEAB25A10

View file

@ -130,6 +130,8 @@ Zotero.File = new function(){
* Get contents of a binary file
*/
this.getBinaryContents = function(file) {
Zotero.debug("Zotero.File.getBinaryContents() is deprecated -- "
+ "use Zotero.File.getBinaryContentsAsync() when possible", 2);
var iStream = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance(Components.interfaces.nsIFileInputStream);
iStream.init(file, 0x01, 0o664, 0);