directory property
String
get
directory
Add a bar to the end of dir, only if necessary. An empty dir means the current directory (and not the filesystem root).
Implementation
String get directory => dir.isEmpty
? "./"
: (dir.endsWith("/") || dir.endsWith("\\"))
? dir
: dir + "/";