23 lines
438 B
Dart
23 lines
438 B
Dart
import 'dart:io';
|
|
|
|
class PathHelper {
|
|
String pth = "";
|
|
PathHelper({required this.pth});
|
|
|
|
static String combine(String path1, String path2) {
|
|
return path1 + Platform.pathSeparator + path2;
|
|
}
|
|
|
|
static PathHelper builder(String startPath) {
|
|
return PathHelper(pth: startPath);
|
|
}
|
|
|
|
PathHelper resolve(String path2) {
|
|
pth += Platform.pathSeparator + path2;
|
|
return this;
|
|
}
|
|
|
|
String build() {
|
|
return pth;
|
|
}
|
|
}
|