Path: blob/trunk/third_party/closure/goog/fs/filesystemimpl.js
2868 views
// Copyright 2013 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Concrete implementation of the goog.fs.FileSystem interface16* using an HTML FileSystem object.17*/18goog.provide('goog.fs.FileSystemImpl');1920goog.require('goog.fs.DirectoryEntryImpl');21goog.require('goog.fs.FileSystem');22232425/**26* A local filesystem.27*28* This shouldn't be instantiated directly. Instead, it should be accessed via29* {@link goog.fs.getTemporary} or {@link goog.fs.getPersistent}.30*31* @param {!FileSystem} fs The underlying FileSystem object.32* @constructor33* @implements {goog.fs.FileSystem}34* @final35*/36goog.fs.FileSystemImpl = function(fs) {37/**38* The underlying FileSystem object.39*40* @type {!FileSystem}41* @private42*/43this.fs_ = fs;44};454647/** @override */48goog.fs.FileSystemImpl.prototype.getName = function() {49return this.fs_.name;50};515253/** @override */54goog.fs.FileSystemImpl.prototype.getRoot = function() {55return new goog.fs.DirectoryEntryImpl(this, this.fs_.root);56};575859/**60* @return {!FileSystem} The underlying FileSystem object.61*/62goog.fs.FileSystemImpl.prototype.getBrowserFileSystem = function() {63return this.fs_;64};656667