Skip to content

Commit

Permalink
doc: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Nov 21, 2024
1 parent 0c4fa90 commit dd53f13
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions lib/src/path/path.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ extension Path$StringExtension on String {
/// A component of a path. A [Component] roughly corresponds to a substring between path separators (/ or \).
/// e.g. `..`, `dir_name`, `file_name.txt`
/// {@endtemplate}
/// Platform Independent.
sealed class Component {
const Component();
}

/// {@template path.Prefix}
/// A Windows path prefix, e.g., C: or \\server\share. Does not occur on Unix.
/// {@endtemplate}
/// Platform Independent.
class Prefix extends Component {
final String value;
const Prefix(this.value);
Expand All @@ -51,7 +49,6 @@ class Prefix extends Component {
/// The root directory component, appears after any prefix and before anything else.
/// It represents a separator that designates that a path starts from root.
/// {@endtemplate}
/// Platform Independent.
class RootDir extends Component {
final bool isWindows;

Expand All @@ -70,7 +67,6 @@ class RootDir extends Component {
/// {@template path.CurDir}
/// The current directory of a path. i.e. `.`
/// {@endtemplate}
/// Platform Independent.
class CurDir extends Component {
const CurDir();

Expand All @@ -87,7 +83,6 @@ class CurDir extends Component {
/// {@template path.ParentDir}
/// The parent directory of a path. i.e. `..`
/// {@endtemplate}
/// Platform Independent.
class ParentDir extends Component {
const ParentDir();

Expand All @@ -104,7 +99,6 @@ class ParentDir extends Component {
/// {@template path.Normal}
/// A normal component, e.g., `a` and `b` in `a/b`
/// {@endtemplate}
/// Platform Independent.
class Normal extends Component {
final String value;
Normal(this.value);
Expand Down
3 changes: 1 addition & 2 deletions lib/src/path/platform_path.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
part of 'path.dart';

// This is a stub. The correct Path implementation will be imported on compilation.
/// A platform dependent [Path] type. Thus, will use windows paths on windows and unix paths on all other platforms.
/// {@template path.Path}
/// [Path] is for handling file paths in a type-safe manner.
/// This type supports a number of operations for inspecting a path, including breaking the path into its components,
/// extracting the file name, determining whether the path is absolute, and so on.
/// {@endtemplate}
/// Platform Independent.
extension type Path._(String _string) implements Object {
static String get separator => isWindows ? WindowsPath.separator : UnixPath.separator;

Expand Down

0 comments on commit dd53f13

Please sign in to comment.