directoryExists static method

Future<bool> directoryExists(
  1. String relativePath
)

Check if a directory exists in the POD.

relativePath - Path relative to the data directory.

Implementation

static Future<bool> directoryExists(String relativePath) async {
  if (!await PodAuth.isLoggedIn()) {
    return false;
  }

  try {
    final url = await PodPath.getDirUrl(relativePath);
    final status = await PodHttp.checkStatus(url);
    return status == ResourceStatus.exist;
  } catch (e) {
    debugPrint('PodFileSystem.directoryExists() - exception: $e');
    return false;
  }
}