blob: b3023e4eaad9a1cbb0977e969c6fab65d34eedb3 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace": "fileBrowserHandlerInternal",
"compiler_options": {
"implemented_in": "chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h"
},
"description": "none",
"types": [
{
"id": "FileEntryInfo",
"type": "object",
"description": "Information needed to build a file entry that will be returned through the API.",
"properties": {
"fileSystemName": {
"type": "string"
},
"fileSystemRoot": {
"type": "string"
},
"fileFullPath": {
"type": "string"
},
"fileIsDirectory": {
"type": "boolean"
}
}
}
],
"functions": [
{
"name": "selectFile",
"type": "function",
"description": "Prompts user to select file path under which a new file will be created. If the user selects file, the file gets created or, if it already exists, truncated. The function has to be called with user gesture.",
"parameters": [
{
"name": "selectionParams",
"type": "object",
"description": "Parameters that will be used to create new file.",
"properties": {
"suggestedName": {
"type": "string",
"description": "Suggested name for the new file."
},
"allowedFileExtensions": {
"type": "array",
"items": { "type": "string" },
"optional": true,
"description": "List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Extensions should not include the leading '.'. Example: ['jpg', 'png']"
}
}
},
{
"name": "callback",
"type": "function",
"description": "Function called upon completion.",
"parameters": [
{
"name": "result",
"description": "Result of the method.",
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Has the file been selected."
},
"entry": {
"$ref": "FileEntryInfo",
"optional": true,
"description": "Selected file entry."
}
}
}
]
}
]
}
]
}
]