createDirectory static method

Future<bool> createDirectory(
  1. String relativePath
)

Create a directory in the POD.

relativePath - Path relative to the data directory.

Returns true if creation was successful.

Implementation

static Future<bool> createDirectory(String relativePath) async {
  if (!await PodAuth.isLoggedIn()) {
    debugPrint('PodFileSystem.createDirectory() - not logged in');
    return false;
  }

  try {
    return await _ensureDirectoryExists(PodPath.getFilePath(relativePath));
  } catch (e) {
    debugPrint('PodFileSystem.createDirectory() - exception: $e');
    return false;
  }
}