AsserestFileAccess constructor
Construct a file access property for ftpPath
and determine
is operated success
or not.
ftpPath
must be in absolute form or throws NonAbsolutePathException
if not obey.
Implementation
factory AsserestFileAccess(String ftpPath, bool success) {
final pathUri = Uri.file(ftpPath, windows: false);
if (!pathUri.hasAbsolutePath) {
// Unaccept relative path
throw NonAbsolutePathException._(pathUri);
}
return AsserestFileAccess._(
UnmodifiableListView(pathUri.pathSegments), success);
}