     Copy an entry to a different location on the file system (not supported)
     ###
     copyTo: (parent, newName, successCallback, errorCallback) ->
-      errorCallback?()
+      errorCallback?({code: FileError.NO_MODIFICATION_ALLOWED_ERR})
       undefined
 
     ###*

    ###*
    @protected
    Constructor of GitHubRepoEntry
    ###
    constructor: (@_fs, @_parent, @_url, @_name, @_mdate) ->
      @_mdate or= (@_parent or this)._mdate
      @_isFile = true
      @_fullPath = "#{(@_parent?.fullPath or "").replace(/\/$/, '')}/#{@_name}"

  ###*
  @class

    file: (successCallback, errorCallback) ->
      req = new XMLHttpRequest
      req.open("GET", @_url)
      req.responseType = "arraybuffer"
      req.onreadystatechange = =>
        return unless req.readyState == XMLHttpRequest.DONE
        unless req.status == 200
          return errorCallback?({code: FileError.NOT_FOUND_ERR})
        array = new Uint8Array(req.response.size)
        successCallback(new File([req.response], @_name))
      req.send()
      undefined

    ###*
    @private
    Constructor of GitHubRepoFileEntry
    @param {GitHubRepoFileSystem}     fs      File system object
    @param {GitHubRepoDirectoryEntry} parent  Parent directory @nullable
    @param {String}                   path    Relative path from parent
    ###
    constructor: (fs, parent, path) ->
      super
      @_isFile = true
      ref = @_fs._ref
      @_url = "#{RAW_URL}/#{@_fs._owner}/#{@_fs._repo}/" +
        "#{ref.commit or ref.tag or ref.branch}#{@_fullPath}"

  ###*
  @property {String} name
  @readonly
  Name of the file system
  ###
  @property "name", get: -> "GitHub"

  ###*
  @property {DirectoryEntry} root
  @readonly
  The root directory of the file system
  ###
  @property "root", get: -> @_root

  ###*
  @static
  Request filesystem for GitHub repository storage
  @param {String}   owner             Owner name
  @param {String}   repo              Repository name
  @param {String}   ref.branch        Branch name (default: "master") @nullable
  @param {String}   ref.tag           Tag name @nullable
  @param {String}   ref.commit        Commit hash @nullable
  @param {Function} successCallback   Callback ({FileSystem} fs)
  @param {Function} errorCallback     Callback ({FileError} err) @nullable
  ###
  @requestFileSystem: (owner, repo, ref, successCallback, errorCallback) ->
    successCallback(new GitHubRepoFileSystem(owner, repo, ref))
    undefined

  ###*
  @private
  Get commit information from GitHub API
  @param {String}   commit      Commit hash @nullable
  @param {Function} callback    Callback ({Boolean} result)
  ###
  _getCommitInfo: (commit, callback) ->
    req = new XMLHttpRequest
    base = "#{API_URL}/repos/#{@_owner}/#{@_repo}/git"
    commit or= @_ref.commit
    if commit
      req.open("GET", "#{base}/commits/#{commit}")
      req.responseType = "json"
      req.onreadystatechange = =>
        return unless req.readyState == XMLHttpRequest.DONE
        return callback(false) unless req.status == 200
        @_commit = req.response
        callback(true)
      req.send()
    else
      base += "/refs/"
      if @_ref.tag
        base += "tags/#{@_ref.tag}"
      else
        base += "heads/#{@_ref.branch}"
      req.open("GET", base)
      req.responseType = "json"
      req.onreadystatechange = =>
        return unless req.readyState == XMLHttpRequest.DONE
        return callback(false) unless req.status == 200
        @_getCommitInfo(req.response.object.sha, callback)
      req.send()
    undefined

  ###*
  @private
  Constructor of GitHubRepoFileSystem
  @param {String} _owner        Owner name
  @param {String} _repo         Repository name
  @param {String} _ref.branch   Branch name (default: "master") @nullable
  @param {String} _ref.tag      Tag name @nullable
  @param {String} _ref.commit   Commit hash @nullable
  ###
  constructor: (@_owner, @_repo, @_ref) ->
    @_root = new GitHubRepoDirectoryEntry(this, null, "/")
    @_ref or= {}
    @_ref.branch or= "master" unless @_ref.tag or @_ref.commit
    @_commit = null

