From fc8c5fdce62fb229202659408798a7b6c98f6e8b Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:55 +0800 Subject: --- cli/internal/turbopath/anchored_unix_path.go | 31 ---------------------------- 1 file changed, 31 deletions(-) delete mode 100644 cli/internal/turbopath/anchored_unix_path.go (limited to 'cli/internal/turbopath/anchored_unix_path.go') diff --git a/cli/internal/turbopath/anchored_unix_path.go b/cli/internal/turbopath/anchored_unix_path.go deleted file mode 100644 index 23e371a..0000000 --- a/cli/internal/turbopath/anchored_unix_path.go +++ /dev/null @@ -1,31 +0,0 @@ -package turbopath - -import ( - "path" - "path/filepath" -) - -// AnchoredUnixPath is a path stemming from a specified root using Unix `/` separators. -type AnchoredUnixPath string - -// ToString returns a string represenation of this Path. -// Used for interfacing with APIs that require a string. -func (p AnchoredUnixPath) ToString() string { - return string(p) -} - -// ToSystemPath converts a AnchoredUnixPath to a AnchoredSystemPath. -func (p AnchoredUnixPath) ToSystemPath() AnchoredSystemPath { - return AnchoredSystemPath(filepath.FromSlash(p.ToString())) -} - -// ToUnixPath returns itself. -func (p AnchoredUnixPath) ToUnixPath() AnchoredUnixPath { - return p -} - -// Join appends relative path segments to this RelativeUnixPath. -func (p AnchoredUnixPath) Join(additional ...RelativeUnixPath) AnchoredUnixPath { - cast := RelativeUnixPathArray(additional) - return AnchoredUnixPath(path.Join(p.ToString(), path.Join(cast.ToStringArray()...))) -} -- cgit v1.2.3-70-g09d2