Class Index | File Index

## Classes

- _global_
- Array
- Boolean
- Date
- Function
- Object
- orion.breadcrumbs.BreadCrumbs
- orion.cm.Configuration
- orion.cm.ConfigurationAdmin
- orion.cm.ConfigurationProperties
- orion.cm.ManagedService
- orion.commandregistry.CommandRegistry
- orion.commandregistry.ParameterCollector
- orion.commands.Command
- orion.commands.CommandInvocation
- orion.commands.CommandParameter
- orion.commands.ParametersDescription
- orion.commands.URLBinding
- orion.compare.CompareCommandFactory
- orion.compare.CompareOptions
- orion.compare.CompareSyntaxHighlighter
- orion.compare.CompareView
- orion.compare.CompareViewOptions
- orion.compare.DiffProvider
- orion.compare.FileOptions
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compare.toggleableCompareView
- orion.compare.TwoWayCompareView
- orion.compareUtils
- orion.core.ContentType
- orion.core.ContentTypeRegistry
- orion.Deferred
- orion.dialogs.DialogService
- orion.DiffTreeNavigator.DiffTreeNavigator
- orion.DiffTreeNavigator.inlineDiffBlockFeeder
- orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
- orion.edit.ASTManager
- orion.edit.Dispatcher
- orion.edit.EditorContext
- orion.edit.editorContext.getEditorContext
- orion.editor.ActionDescription
- orion.editor.Annotation
- orion.editor.AnnotationIterator
- orion.editor.AnnotationModel
- orion.editor.AnnotationRuler
- orion.editor.AnnotationStyler
- orion.editor.AnnotationType
- orion.editor.AnnotationTypeList
- orion.editor.AsyncStyler
- orion.editor.BaseEditor
- orion.editor.BlurEvent
- orion.editor.ContentAssist
- orion.editor.ContentAssistMode
- orion.editor.ContentAssistProvider
- orion.editor.ContentAssistProvider.Context
- orion.editor.ContentAssistWidget
- orion.editor.ContextMenuEvent
- orion.editor.CssContentAssistProvider
- orion.editor.DestroyEvent
- orion.editor.EditOptions
- orion.editor.Editor
- orion.editor.EventTarget
- orion.editor.FindIterator
- orion.editor.FindOptions
- orion.editor.FocusEvent
- orion.editor.FoldingAnnotation
- orion.editor.HTMLContentAssistProvider
- orion.editor.InputManager
- orion.editor.JSTemplateContentAssistProvider
- orion.editor.KeyEvent
- orion.editor.LineNumberRuler
- orion.editor.LineStyleEvent
- orion.editor.ModelChangedEvent
- orion.editor.ModelChangingEvent
- orion.editor.ModifyEvent
- orion.editor.OverviewRuler
- orion.editor.Projection
- orion.editor.ProjectionTextModel
- orion.editor.Ruler
- orion.editor.ScrollEvent
- orion.editor.Selection
- orion.editor.SelectionEvent
- orion.editor.Style
- orion.editor.StyleRange
- orion.editor.StyleReadyEvent
- orion.editor.StyleReadyEvent#LineStyle
- orion.editor.TextChange
- orion.editor.TextMateStyler
- orion.editor.TextModel
- orion.editor.TextTheme
- orion.editor.TextView
- orion.editor.TextViewOptions
- orion.editor.ThemeChangedEvent
- orion.editor.ThemeStyleSheet
- orion.editor.UndoStack
- orion.editor.VerifyEvent
- orion.EditorView
- orion.EventTarget
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.FileExplorer
- orion.explorer.FileExplorer.ModelHandler
- orion.explorer.NavigatorRenderer
- orion.explorer.SelectionRenderer
- orion.explorerNavHandler.ExplorerNavDict
- orion.explorerNavHandler.ExplorerNavHandler
- orion.extensionCommands
- orion.fileClient.FileClient
- orion.fileCommands
- orion.fileUtils
- orion.FolderView
- orion.form
- orion.git.GitCommitExplorer
- orion.git.GitLogExplorer
- orion.git.GitRepositoryExplorer
- orion.git.GitReviewRequestExplorer
- orion.git.GitService
- orion.git.GitStatusExplorer
- orion.git.widgets.OpenCommitDialog
- orion.globalCommands
- orion.highlight.SyntaxHighlighter
- orion.KeyBinding
- orion.KeySequence
- orion.KeyStroke
- orion.links.TextLinkService
- orion.log.LogService
- orion.metatype.AttributeDefinition
- orion.metatype.MetaTypeRegistry
- orion.metatype.ObjectClassDefinition
- orion.mirror.CodeMirrorStyler
- orion.mirror.Mirror
- orion.mirror.MirrorLineStyle
- orion.mirror.ModeApplier
- orion.navoutliner.NavigationOutliner
- orion.objects
- orion.operation
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.PageLinks
- orion.parametercollectors.CommandParameterCollector
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.progress.ProgressService
- orion.projectClient.ProjectClient
- orion.Promise
- orion.regex
- orion.search.AdvSearchOptRenderer
- orion.searchClient.Searcher
- orion.searches.SavedSearches
- orion.Searches.SearchBuilder
- orion.Searches.SearchList
- orion.searchResults.SearchResultsGenerator
- orion.searchUtils
- orion.searchUtils.SearchParams
- orion.selection.Selection
- orion.serviceregistry.ServiceEvent
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.ServiceTracker
- orion.settings.Setting
- orion.settings.SettingsRegistry
- orion.settings.ui.PropertyWidget
- orion.shell.Command
- orion.shell.Parameter
- orion.shell.ParameterType
- orion.shell.Shell
- orion.sidebar.MiniNavViewMode
- orion.sidebar.ProjectNavViewMode
- orion.sidebar.Sidebar
- orion.sidebar.ViewMode
- orion.sites.SiteClient
- orion.sites.SiteConfiguration
- orion.sites.SiteEditor
- orion.sites.SiteService
- orion.sites.ViewOnSiteTree
- orion.status.StatusReportingService
- orion.SyntaxChecker
- orion.tasks.TaskList
- orion.TreeModelIterator.TreeModelIterator
- orion.treetable.TableTree
- orion.uiUtils
- orion.URITemplate
- orion.util
- orion.webui.dialogs.OpenResourceDialog
- orion.webui.dialogs.OperationsDialog
- orion.webui.littlelib
- orion.webui.Splitter
- orion.widgets.Filesystem.FilesystemSwitcher
- orion.widgets.Section
- orion.widgets.settings.SplitSelectionLayout
- orion.xhr
- orion.xhr.Result
- String

# Class orion.fileClient.FileClient

The file client provides a convenience API for interacting with file services provided by plugins. This class handles authorization, and authentication-related error handling.
Defined in: </shared/eclipse/e4/orion/I201310301703/plugins/org.eclipse.orion.client.core/web/orion/fileClient.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.fileClient.FileClient() Creates a new file client.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| copyFile(sourceLocation, targetLocation, name) Copies a file or directory.
| createFile(parentLocation, fileName) Create a new file in a specified location.
| createFolder(parentLocation, folderName) Creates a folder.
| createProject(url, projectName, serverPath, create) Adds a project to a workspace.
| createWorkspace(name) Creates a new workspace with the given name.
| deleteFile(location) Deletes a file, directory, or project.
| fetchChildren(location) Obtains the children of a remote resource
| fileServiceName(location) Returns the name of the file service managing this location
| fileServiceRootURL(location) Returns the root url of the file service managing this location
| getService(location) Returns the file service managing this location
| loadWorkspace(location, onLoad) Loads the workspace with the given id and sets it to be the current workspace for the IDE.
| loadWorkspaces() Loads all the user's workspaces.
| moveFile(sourceLocation, targetLocation, name) Moves a file or directory.
| read(location, isMetadata) Returns the contents or metadata of the file at the given location.
| remoteExport(sourceLocation, options) Exports file and directory contents to another server
| remoteImport(targetLocation, options) Imports file and directory contents from another server
| search(searchParams) Performs a search with the given search parameters.
| write(location, contents, args) Writes the contents or metadata of the file at the given location.

Class Detail
orion.fileClient.FileClient()
Creates a new file client.
Method Detail
copyFile(sourceLocation, targetLocation, name)
Copies a file or directory.

Parameters:
{String} sourceLocation
  The location of the file or directory to copy.
{String} targetLocation
  The location of the target folder.
{String} name Optional
  The name of the destination file or directory in the case of a rename

{Object} createFile(parentLocation, fileName)
Create a new file in a specified location. Returns a deferred that will provide The new file object when ready.

Parameters:
{String} parentLocation
  The location of the parent folder
{String} fileName
  The name of the file to create

Returns:
  {Object} A deferred that will provide the new file object

{Object} createFolder(parentLocation, folderName)
Creates a folder.

Parameters:
{String} parentLocation
  The location of the parent folder
{String} folderName
  The name of the folder to create

Returns:
  {Object} JSON representation of the created folder

createProject(url, projectName, serverPath, create)
Adds a project to a workspace.

Parameters:
{String} url
  The workspace location
{String} projectName
  the human-readable name of the project
{String} serverPath
  The optional path of the project on the server.
{Boolean} create
  If true, the project is created on the server file system if it doesn't already exist

createWorkspace(name)
Creates a new workspace with the given name. The resulting workspace is passed as a parameter to the provided onCreate function.

Parameters:
{String} name
  The name of the new workspace

deleteFile(location)
Deletes a file, directory, or project.

Parameters:
{String} location
  The location of the file or directory to delete.

fetchChildren(location)
Obtains the children of a remote resource

Parameters:
location
  The location of the item to obtain children for

Returns:
  A deferred that will provide the array of child objects when complete

fileServiceName(location)
Returns the name of the file service managing this location

Parameters:
location
  The location of the item

fileServiceRootURL(location)
Returns the root url of the file service managing this location

Parameters:
location
  The location of the item

getService(location)
Returns the file service managing this location

Parameters:
location
  The location of the item

loadWorkspace(location, onLoad)
Loads the workspace with the given id and sets it to be the current workspace for the IDE. The workspace is created if none already exists.

Parameters:
{String} location
  the location of the workspace to load
{Function} onLoad
  the function to invoke when the workspace is loaded

loadWorkspaces()
Loads all the user's workspaces. Returns a deferred that will provide the loaded workspaces when ready.

moveFile(sourceLocation, targetLocation, name)
Moves a file or directory.

Parameters:
{String} sourceLocation
  The location of the file or directory to move.
{String} targetLocation
  The location of the target folder.
{String} name Optional
  The name of the destination file or directory in the case of a rename

read(location, isMetadata)
Returns the contents or metadata of the file at the given location.

Parameters:
{String} location
  The location of the file to get contents for
{Boolean} isMetadata Optional
  If defined and true, returns the file metadata, otherwise file contents are returned

Returns:
  A deferred that will be provided with the contents or metadata when available

remoteExport(sourceLocation, options)
Exports file and directory contents to another server

Parameters:
{String} sourceLocation
  The location of the folder to export from
{Object} options
  An object specifying the export parameters

Returns:
  A deferred for chaining events after the export completes

remoteImport(targetLocation, options)
Imports file and directory contents from another server

Parameters:
{String} targetLocation
  The location of the folder to import into
{Object} options
  An object specifying the import parameters

Returns:
  A deferred for chaining events after the import completes

search(searchParams)
Performs a search with the given search parameters.

Parameters:
{Object} searchParams
  The JSON object that describes all the search parameters.
{String} searchParams.resource
  Required. The location where search is performed. Required. Normally a sub folder of the file system. Empty string means the root of the file system.
{String} searchParams.keyword
  The search keyword. Required but can be empty string. If fileType is a specific type and the keyword is empty, then list up all the files of that type. If searchParams.regEx is true then the keyword has to be a valid regular expression.
{String} searchParams.sort
  Required. Defines the order of the return results. Should be either "Path asc" or "Name asc". Extensions are possible but not currently supported.
{boolean} searchParams.nameSearch
  Optional. If true, the search performs only file name search.
{String} searchParams.fileType
  Optional. The file type. If specified, search will be performed under this file type. E.g. "*.*" means all file types. "html" means html files.
{Boolean} searchParams.regEx
  Optional. The option of regular expression search.
{integer} searchParams.start
  Optional. The zero based strat number for the range of the returned hits. E.g if there are 1000 hits in total, then 5 means the 6th hit.
{integer} searchParams.rows
  Optional. The number of hits of the range. E.g if there are 1000 hits in total and start=5 and rows=40, then the return range is 6th-45th.

write(location, contents, args)
Writes the contents or metadata of the file at the given location.

Parameters:
{String} location
  The location of the file to set contents for
{String|Object} contents
  The content string, or metadata object to write
{String|Object} args
  Additional arguments used during write operation (i.e. ETag)

Returns:
  A deferred for chaining events after the write completes with new metadata object

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 30 2013 17:06:42 GMT-0400 (EDT)