blob: 2e1e72be40e970b5110c69cf270a444707039a2e [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of file.src.backends.local;
abstract class _LocalFileSystemEntity<T extends FileSystemEntity,
D extends io.FileSystemEntity> extends ForwardingFileSystemEntity<T, D> {
final FileSystem fileSystem;
final D delegate;
_LocalFileSystemEntity(this.fileSystem, this.delegate);
String get dirname => fileSystem.path.dirname(path);
String get basename => fileSystem.path.basename(path);
Directory wrapDirectory(io.Directory delegate) =>
new _LocalDirectory(fileSystem, delegate);
File wrapFile(io.File delegate) => new _LocalFile(fileSystem, delegate);
Link wrapLink(io.Link delegate) => new _LocalLink(fileSystem, delegate);