@@ -40,31 +40,26 @@ class FileHolder {
40
40
41
41
final String stageName
42
42
43
- final Path origPath
44
-
45
- FileHolder ( Path inputFile , Path origPath = null ) {
43
+ FileHolder ( Path inputFile ) {
46
44
assert inputFile
47
45
this . sourceObj = inputFile
48
46
this . storePath = real(inputFile)
49
47
this . stageName = norm(inputFile. getFileName())
50
- this . origPath = origPath
51
48
}
52
49
53
- FileHolder ( def origin , Path path , Path origPath = null ) {
50
+ FileHolder ( def origin , Path path ) {
54
51
assert origin != null
55
52
assert path != null
56
53
57
54
this . sourceObj = origin
58
55
this . storePath = path
59
56
this . stageName = norm(path. getFileName())
60
- this . origPath = origPath
61
57
}
62
58
63
- protected FileHolder ( def source , Path store , def stageName , Path origPath = null ) {
59
+ protected FileHolder ( def source , Path store , def stageName ) {
64
60
this . sourceObj = source
65
61
this . storePath = store
66
62
this . stageName = norm(stageName)
67
- this . origPath = origPath
68
63
}
69
64
70
65
FileHolder withName ( def stageName ) {
@@ -75,7 +70,9 @@ class FileHolder {
75
70
76
71
String getStageName () { stageName }
77
72
78
- Path getOrigPath () { origPath }
73
+ Path getSourcePath () {
74
+ sourceObj instanceof Path ? sourceObj : null
75
+ }
79
76
80
77
@PackageScope
81
78
static FileHolder get ( def path , def name = null ) {
0 commit comments