google / files.dart Goto Github PK
View Code? Open in Web Editor NEWA filesystem API with implementations for multiple environments
License: BSD 3-Clause "New" or "Revised" License
A filesystem API with implementations for multiple environments
License: BSD 3-Clause "New" or "Revised" License
unused import dart:async as Futures and Streams already implemented in dart:core as per Dart 2.1
Set up drone.io to test on each commit.
Just a tracking issue, so I know when I can start using it from there.
abstract class HtmlFileSystemEntry implements FileSystemEntry {
HtmlFileSystemEntry._(this._fs, this._path);
}
This class is an abstract class.
This class is a public class.
This class with a private constructor.
Public abstract class with a private constructor.
How can be called such programming techniques?
This technique only useful for the static classes.
Eg.
abstract class Platform {
Platform._internal();
static final int foo = 0;
}
This class is an abstract class (cannot be instantiated).
This class is a public class (cannot be used anywhere).
This class with a private constructor (cannot be instantiated).
What wrong with this approach?
abstract class HtmlFileSystemEntry implements FileSystemEntry {
}
class _HtmlFileSystemEntry implements HtmlFileSystemEntry {
_HtmlFileSystemEntry(this._fs, this._path);
}
Of cource, if you really need HtmlFileSystemEntry
interface.
P.S.
I know that you (possible) like a Dartish
way.
But Dartish
way (beloved by ahe
) are not a right way for the many serious programmers.
This is because, if your HtmlFileSystemEntry
is an interface purpose type then it has a wrong design.
abstract class HtmlFileSystemEntry implements FileSystemEntry {
final HtmlFileSystem _fs;
final String _path;
HtmlFileSystemEntry._(this._fs, this._path);
String get path => _path;
}
Remeber: I cannot use it as an interface.
// Missing concrete implementation
// of getter 'HtmlFileSystemEntry._path',
// getter 'HtmlFileSystemEntry._fs'
// getter 'HtmlFileSystemEntry.path'
class MyHtmlFileSystemEntry implements HtmlFileSystemEntry {
}
If I cannot use it as an interface then why it is a
Where is a logic?
This would be useful for things like mocking when testing.
Based on the https://github.com/dart-gde/chrome.dart package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.