[jira] [Commented] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367044#comment-14367044 ] Rafael B commented on CB-6428: -- Hi Andrew, It's work!!! Nice job. Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367567#comment-14367567 ] Rafael B commented on CB-6428: -- apologize for the inconvenience Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14367551#comment-14367551 ] Rafael B commented on CB-6428: -- I found a new error, but now, IOS version. {code} var app = {}; window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, function() { console.log(3 +JSON.stringify(rs));}); function gotFileSystem(v) { app.fileSystem = v; var url = cordova.file.applicationDirectory+www/1.jpg; window.resolveLocalFileSystemURL(url, function(entry) { var fullPath = cordova.file.applicationStorageDirectory; window.resolveLocalFileSystemURL(fullPath, function(entryDirectory) { entry.copyTo(entryDirectory, 'newfile.jpg', function(rs) { console.log(JSON.stringify(rs)); //success }, function() { console.log(1 +JSON.stringify(rs));} ); //error code 12 in next test's. }, function() { console.log(2 +JSON.stringify(rs));} ); }, function() { console.log(3 +JSON.stringify(rs));} ); } {code} If execute first time, return success, but execute others time, return error (error code 12) You can fix this or i need open a new bug? Thanks Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-8708) copyTo error
Rafael B created CB-8708: Summary: copyTo error Key: CB-8708 URL: https://issues.apache.org/jira/browse/CB-8708 Project: Apache Cordova Issue Type: Bug Components: iOS Environment: org.apache.cordova.file 1.3.4-dev File Reporter: Rafael B I found a new error, but now, IOS version. {code} var app = {}; window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, function() { console.log(3 +JSON.stringify(rs));}); function gotFileSystem(v) { app.fileSystem = v; var url = cordova.file.applicationDirectory+www/1.jpg; window.resolveLocalFileSystemURL(url, function(entry) { var fullPath = cordova.file.applicationStorageDirectory; window.resolveLocalFileSystemURL(fullPath, function(entryDirectory) { entry.copyTo(entryDirectory, 'newfile.jpg', function(rs) { console.log(JSON.stringify(rs)); //success }, function() { console.log(1 +JSON.stringify(rs));} ); //error code 12 in next test's. }, function() { console.log(2 +JSON.stringify(rs));} ); }, function() { console.log(3 +JSON.stringify(rs));} ); } {code} If execute first time, return success, but execute others time, return error (error code 12) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14366020#comment-14366020 ] Rafael B commented on CB-6428: -- Hi Andrew, If .jpg inside in cordova.file.applicationDirectory and copy to storage, not working. (copy Directory same error) for image files. Sorry for example code, it's code right: {code} var app = {}; window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, function() { console.log(3 +JSON.stringify(rs));}); function gotFileSystem(v) { app.fileSystem = v; var url = cordova.file.applicationDirectory+www/1.jpg; window.resolveLocalFileSystemURL(url, function(entry) { var fullPath = ; app.fileSystem.root.getDirectory(fullPath, {create:true, exclusive:false}, function(entryDirectory) { entry.copyTo(entryDirectory, 'newfile.jpg', function(rs) { console.log(JSON.stringify(rs)); //success }, function() { console.log(1 +JSON.stringify(rs));} ); }, function() { console.log(2 +JSON.stringify(rs));} ); }, function() { console.log(3 +JSON.stringify(rs));} ); } {code} {code} File create: -rw--- u0_a59 u0_a59 0 2015-03-17 17:30 newfile.jpg {code} Return success of copy file, but without success (0 bytes). Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14365847#comment-14365847 ] Rafael B commented on CB-6428: -- This fix resolve window.resolveLocalFileSystemURL, but exist a other error entry.copyTo return Success but create file with 0 bytes. Example: {code} var url = cordova.file.applicationDirectory+1.jpg; window.resolveLocalFileSystemURL(url, function(entry) { var fullPath = ; app.fileSystem.root.getDirectory(fullPath, {create:true, exclusive:false}, function(entryDirectory) { entry.copyTo(entryDirectory, 'newfile.jpg', function(rs) { console.log(JSON.stringify(rs)); }, function() { console.log(1 +JSON.stringify(rs));} ); }, function() { console.log(2 +JSON.stringify(rs));} ); }, function() { console.log(3 +JSON.stringify(rs));} ); {code} Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org