This class wrapps the file name applying the file name format rule for Material.
MaterialFileName mfn = new MaterialFileName('abc.def (1).csv')
assert mfn.parts[0] == 'abc.def (1).csv'
assert mfn.parts[1] == 'abc.def '
assert mfn.parts[2] == '(1)'
assert mfn.parts[3] == '.csv'
assert mfn.getSuffix() == new Suffix(1)
assert mfn.getFileType() == FileType.CSV
| Modifiers | Name | Description |
|---|---|---|
protected static java.util.regex.Pattern |
PTN_SUFFIX |
| Constructor and description |
|---|
MaterialFileName
(java.lang.String fileName) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.String |
format(java.net.URL url, Suffix suffix, FileType fileType)Based on the given URL string, determines the file name of a Material. |
|
static java.lang.String |
formatEncoded(java.net.URL url, Suffix suffix, FileType fileType) |
|
java.lang.String |
getFileName() |
|
FileType |
getFileType() |
|
Suffix |
getSuffix() |
|
java.net.URL |
getURL()@return a URL found in the file name, may return null |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Based on the given URL string, determines the file name of a Material. The file name is in the format:
<encoded URL string>.<file extension>for example:
http:%3A%2F%2Fdemoaut.katalon.com%2F.pngor
<encoded URL string>§<suffix string>.<file extension>for example:
http:%3A%2F%2Fdemoaut.katalon.com%2F§atoz.png
Groovy Documentation