Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

function name changes in chrome.fileSystem namespace.

  • Loading branch information...
commit abc0254d75581c596715365f458ef571c07d3f1f 1 parent 01b42af
@mangini mangini authored
View
BIN  diff/js/.filesystem.js.swp
Binary file not shown
View
4 diff/js/filesystem.js
@@ -168,7 +168,7 @@ function selectURL() {
}
function selectFile(fileNum, chooseNew) {
- chrome.fileSystem.chooseFile({'type': 'openFile'}, function(fileEntry) {
+ chrome.fileSystem.chooseEntry({'type': 'openFile'}, function(fileEntry) {
fileEntries[fileNum] = fileEntry;
chrome.fileSystem.getDisplayPath(fileEntry, function(path) {
var pathList = path.split('/');
@@ -324,7 +324,7 @@ function saveFile(content, fileName) {
}
function saveFileAs() {
- chrome.fileSystem.chooseFile({'type': 'saveFile'}, function(fileEntry) {
+ chrome.fileSystem.chooseEntry({'type': 'saveFile'}, function(fileEntry) {
save(fileEntry, getText(1));
});
}
View
6 filesystem-access/js/app.js
@@ -94,7 +94,7 @@ chooseFileButton.addEventListener('click', function(e) {
//mimeTypes: ['text/*'],
extensions: ['js', 'css', 'txt', 'html', 'xml', 'tsv', 'csv', 'rtf']
}];
- chrome.fileSystem.chooseFile({type: 'openFile', accepts: accepts}, function(readOnlyEntry) {
+ chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function(readOnlyEntry) {
if (!readOnlyEntry) {
output.textContent = 'No file selected.';
return;
@@ -116,7 +116,7 @@ chooseFileButton.addEventListener('click', function(e) {
// writeFileButton.addEventListener('click', function(e) {
// if (chosenFileEntry) {
-// chrome.fileSystem.getWritableFileEntry(chosenFileEntry, function(writableEntry) {
+// chrome.fileSystem.getWritableEntry(chosenFileEntry, function(writableEntry) {
// writeFileEntry(writableEntry, null, function(e) {
// output.textContent = 'Write complete :)';
// });
@@ -126,7 +126,7 @@ chooseFileButton.addEventListener('click', function(e) {
saveFileButton.addEventListener('click', function(e) {
var config = {type: 'saveFile', suggestedName: chosenFileEntry.name};
- chrome.fileSystem.chooseFile(config, function(writableEntry) {
+ chrome.fileSystem.chooseEntry(config, function(writableEntry) {
var blob = new Blob([textarea.value], {type: 'text/plain'});
writeFileEntry(writableEntry, blob, function(e) {
output.textContent = 'Write complete :)';
View
4 mini-code-edit/editor.js
@@ -130,14 +130,14 @@ function handleNewButton() {
}
function handleOpenButton() {
- chrome.fileSystem.chooseFile({ type: 'openFile' }, onChosenFileToOpen);
+ chrome.fileSystem.chooseEntry({ type: 'openFile' }, onChosenFileToOpen);
}
function handleSaveButton() {
if (fileEntry && hasWriteAccess) {
writeEditorToFile(fileEntry);
} else {
- chrome.fileSystem.chooseFile({ type: 'saveFile' }, onChosenFileToSave);
+ chrome.fileSystem.chooseEntry({ type: 'saveFile' }, onChosenFileToSave);
}
}
View
6 text-editor/editor.js
@@ -122,7 +122,7 @@ function createNew() {
}
function openFile() {
- chrome.fileSystem.chooseFile(function (entry) {
+ chrome.fileSystem.chooseEntry(function (entry) {
if (chrome.runtime.lastError) {
showError(chrome.runtime.lastError.message);
return;
@@ -137,7 +137,7 @@ function saveFile() {
if (gotWritable) {
saveToEntry();
} else if (fileEntry) {
- chrome.fileSystem.getWritableFileEntry(fileEntry, function(entry) {
+ chrome.fileSystem.getWritableEntry(fileEntry, function(entry) {
if (chrome.runtime.lastError) {
showError(chrome.runtime.lastError.message);
return;
@@ -152,7 +152,7 @@ function saveFile() {
}
function saveAs() {
- chrome.fileSystem.chooseFile({type: 'saveFile'}, function(entry) {
+ chrome.fileSystem.chooseEntry({type: 'saveFile'}, function(entry) {
if (chrome.runtime.lastError) {
showError(chrome.runtime.lastError.message);
return;
Please sign in to comment.
Something went wrong with that request. Please try again.