saveToDirectory method

Future<AdaptiveFile> saveToDirectory(
  1. String directoryPath
)

Saves the file into a directory folder using its current name. Returns a new AdaptiveFile pointing to the saved file in directoryPath.

Implementation

Future<AdaptiveFile> saveToDirectory(String directoryPath) {
  final separator = directoryPath.endsWith('/') || directoryPath.endsWith('\\') ? '' : '/';
  return saveTo('$directoryPath$separator$name');
}