Get username from filepath. (#265)
This commit is contained in:
parent
b154c04178
commit
c59c72729b
3 changed files with 12 additions and 1 deletions
|
|
@ -32,6 +32,10 @@ public class Password {
|
|||
return url.deletingPathExtension().path
|
||||
}
|
||||
|
||||
public var nameFromPath: String? {
|
||||
return url.deletingPathExtension().path.split(separator: "/").last.map { String($0) }
|
||||
}
|
||||
|
||||
public var password: String {
|
||||
return parser.firstLine
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue