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

    file: (successCallback, errorCallback) ->
      req = new XMLHttpRequest
      req.open("GET", @_url)
      req.responseType = "json"
      req.onreadystatechange = =>
        return unless req.readyState == XMLHttpRequest.DONE
        return errorCallback?() unless req.status == 200
        array = new Uint8Array(req.response.size)
        switch req.response.encoding
          when "base64"
            bin = atob(req.response.content)
            (array[i] = bin.charCodeAt(i)) for i in [0...array.length]
          else
            return errorCallback?()
        successCallback(new File([array], @_name, {lastModified: @_mdate}))
      req.send()
      undefined

    ###*
    @private
    Constructor of GitHubRepoFileEntry
    ###
    constructor: (fs, parent, url, name, mdate) ->
      super

  ###*
  @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 of repository
  @param {String}   repo              Name of repository
  @param {String}   ref.branch        Name of branch (default: master) @nullable
  @param {String}   ref.tag           Name of tag @nullable
  @param {Function} successCallback   Callback ({FileSystem} fs)
  @param {Function} errorCallback     Callback () @nullable
  ###
  @requestFileSystem: (owner, repo, ref, successCallback, errorCallback) ->
    if ref?.tag
      path = "tags/#{ref.tag}"
    else
      path = "heads/#{ref?.branch or "master"}"
    fs = new GitHubRepoFileSystem(owner, repo, path)
    fs._request(successCallback, errorCallback)

  ###*
  @private
  Request filesystem (body)
  @param {Function} successCallback   Callback ({FileSystem} fs)
  @param {Function} errorCallback     Callback () @nullable
  ###
  _request: (successCallback, errorCallback) ->
    url = "#{API_URL}/repos/#{@_owner}/#{@_repo}/git"
    req = new XMLHttpRequest
    req.open("GET", "#{url}/refs/#{@_ref}")
    req.responseType = "json"
    req.onreadystatechange = =>
      return unless req.readyState == XMLHttpRequest.DONE
      return errorCallback?() unless req.status == 200
      sha = req.response.object?.sha
      return errorCallback?() unless sha
      req = new XMLHttpRequest
      req.open("GET", "#{url}/commits/#{sha}")
      req.responseType = "json"
      req.onreadystatechange = =>
        return unless req.readyState == XMLHttpRequest.DONE
        return errorCallback?() unless req.status == 200
        date = new Date(req.response.author.date)
        @_root = new GitHubRepoDirectoryEntry(this, null, "#{url}/trees/#{sha}", "", date)
        successCallback(this)
      req.send()
    req.send()
    undefined

  ###*
  @private
  Constructor of GitHubRepoFileSystem
  ###
  constructor: (@_owner, @_repo, @_ref) ->
    null


  class GitHubRepoDirectoryReader
    ###*
    @method
    (NOT SUPPORTED) Returns a list of entries from a specific directory
    @param {Function} successCallback   Callback ({Entry[]} entries)
    @param {Function} errorCallback     Callback ({FileError} err) @nullable
    ###
    readEntries: (successCallback, errorCallback) ->
      errorCallback?({code: FileError.NOT_READABLE_ERR})
      undefined

    ###*
    @private
    Constructor of GitHubRepoDirectoryReader
    @param {GitHubRepoDirectoryEntry} _dir  Entry of target directory
    ###
    constructor: (@_dir) ->
      null

  ###*
  @class
