public static IStorage GetLocalFileSystemStorage()

in Core/src/Impl/Commands/AccessUtil.cs [62:80]


    public static IStorage GetLocalFileSystemStorage(string? dirOrZipFile, StorageAccessMode accessMode, int? concurrencyLevel)
    {
      if (string.IsNullOrEmpty(dirOrZipFile))
        throw new ArgumentException("Directory or zip file should be specified", nameof(dirOrZipFile));
      
      var attributes = File.GetAttributes(dirOrZipFile);
      if ((attributes & FileAttributes.Directory) != 0)
      {
        return GetStorage(dir: dirOrZipFile, zip: null, awsS3BucketName: null, awsS3RegionEndpoint: null, accessMode, concurrencyLevel);
      }
      else if (Path.GetExtension(dirOrZipFile.AsSpan()).CompareTo(".zip".AsSpan(), StringComparison.OrdinalIgnoreCase) == 0)
      {
        return GetStorage(dir: null, zip: dirOrZipFile, awsS3BucketName: null, awsS3RegionEndpoint: null, accessMode, concurrencyLevel);
      }
      else
      {
        throw new ArgumentException("Specified path is not a directory or zip file");
      }
    }