@@ -228,8 +228,19 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity> : I
228228 /// <param name="fileMode">The POSIX file mode permission.</param>
229229 /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
230230 [ PublicAPI ]
231+ [ Obsolete ( "Use WithResourceMapping(byte[], FileInfo, UnixFileModes) instead." ) ]
231232 TBuilderEntity WithResourceMapping ( byte [ ] resourceContent , string filePath , UnixFileModes fileMode = Unix . FileMode644 ) ;
232233
234+ /// <summary>
235+ /// Copies the byte array content to the created container before it starts.
236+ /// </summary>
237+ /// <param name="resourceContent">The byte array content of the resource mapping.</param>
238+ /// <param name="filePath">The target file path to copy the file to.</param>
239+ /// <param name="fileMode">The POSIX file mode permission.</param>
240+ /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
241+ [ PublicAPI ]
242+ TBuilderEntity WithResourceMapping ( byte [ ] resourceContent , FileInfo filePath , UnixFileModes fileMode = Unix . FileMode644 ) ;
243+
233244 /// <summary>
234245 /// Copies the contents of a URL, a test host directory or file to the container before it starts.
235246 /// </summary>
@@ -246,6 +257,7 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity> : I
246257 /// <param name="fileMode">The POSIX file mode permission.</param>
247258 /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
248259 [ PublicAPI ]
260+ [ Obsolete ( "Use one of the more specific WithResourceMapping(…) methods instead." ) ]
249261 TBuilderEntity WithResourceMapping ( string source , string target , UnixFileModes fileMode = Unix . FileMode644 ) ;
250262
251263 /// <summary>
@@ -256,18 +268,40 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity> : I
256268 /// <param name="fileMode">The POSIX file mode permission.</param>
257269 /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
258270 [ PublicAPI ]
271+ [ Obsolete ( "Use WithResourceMapping(DirectoryInfo, DirectoryInfo, UnixFileModes) instead." ) ]
259272 TBuilderEntity WithResourceMapping ( DirectoryInfo source , string target , UnixFileModes fileMode = Unix . FileMode644 ) ;
260273
261274 /// <summary>
262275 /// Copies a test host directory or file to the container before it starts.
263276 /// </summary>
277+ /// <param name="source">The source directory to be copied.</param>
278+ /// <param name="target">The target directory path to copy the files to.</param>
279+ /// <param name="fileMode">The POSIX file mode permission.</param>
280+ /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
281+ [ PublicAPI ]
282+ TBuilderEntity WithResourceMapping ( DirectoryInfo source , DirectoryInfo target , UnixFileModes fileMode = Unix . FileMode644 ) ;
283+
284+ /// <summary>
285+ /// Copies a test host directory or file to the given directory in the container before it starts.
286+ /// </summary>
264287 /// <param name="source">The source file to be copied.</param>
265288 /// <param name="target">The target directory path to copy the file to.</param>
266289 /// <param name="fileMode">The POSIX file mode permission.</param>
267290 /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
268291 [ PublicAPI ]
292+ [ Obsolete ( "Use WithResourceMapping(FileInfo, DirectoryInfo, UnixFileModes) instead." ) ]
269293 TBuilderEntity WithResourceMapping ( FileInfo source , string target , UnixFileModes fileMode = Unix . FileMode644 ) ;
270294
295+ /// <summary>
296+ /// Copies a test host directory or file to the given directory in the container before it starts.
297+ /// </summary>
298+ /// <param name="source">The source file to be copied.</param>
299+ /// <param name="target">The target directory path to copy the file to.</param>
300+ /// <param name="fileMode">The POSIX file mode permission.</param>
301+ /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
302+ [ PublicAPI ]
303+ TBuilderEntity WithResourceMapping ( FileInfo source , DirectoryInfo target , UnixFileModes fileMode = Unix . FileMode644 ) ;
304+
271305 /// <summary>
272306 /// Copies a test host file to the container before it starts.
273307 /// </summary>
@@ -295,8 +329,47 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity> : I
295329 /// <param name="target">The target directory or file path to copy the file to.</param>
296330 /// <param name="fileMode">The POSIX file mode permission.</param>
297331 /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
332+ [ PublicAPI ]
333+ [ Obsolete ( "Use WithResourceMapping(Uri, FileInfo, UnixFileModes) or WithResourceMapping(Uri, DirectoryInfo, UnixFileModes) instead." ) ]
298334 TBuilderEntity WithResourceMapping ( Uri source , string target , UnixFileModes fileMode = Unix . FileMode644 ) ;
299335
336+ /// <summary>
337+ /// Copies a file from a URL to the container before it starts.
338+ /// </summary>
339+ /// <remarks>
340+ /// If the Uri scheme corresponds to a file, the content is copied to the target
341+ /// directory path. If the Uri scheme corresponds to HTTP or HTTPS, the content is
342+ /// copied to the target file path.
343+ ///
344+ /// The Uri scheme must be either <c>http</c>, <c>https</c> or <c>file</c>.
345+ ///
346+ /// If you prefer to copy a file to a specific target file path instead of a
347+ /// directory, use: <see cref="WithResourceMapping(FileInfo, FileInfo, UnixFileModes)" />.
348+ /// </remarks>
349+ /// <param name="source">The source URL of the file to be copied.</param>
350+ /// <param name="target">The target directory path to copy the file to.</param>
351+ /// <param name="fileMode">The POSIX file mode permission.</param>
352+ /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
353+ [ PublicAPI ]
354+ TBuilderEntity WithResourceMapping ( Uri source , DirectoryInfo target , UnixFileModes fileMode = Unix . FileMode644 ) ;
355+
356+ /// <summary>
357+ /// Copies a file from a URL to the container before it starts.
358+ /// </summary>
359+ /// <remarks>
360+ /// If the Uri scheme corresponds to a file, the content is copied to the target
361+ /// directory path. If the Uri scheme corresponds to HTTP or HTTPS, the content is
362+ /// copied to the target file path.
363+ ///
364+ /// The Uri scheme must be either <c>http</c>, <c>https</c> or <c>file</c>.
365+ /// </remarks>
366+ /// <param name="source">The source URL of the file to be copied.</param>
367+ /// <param name="target">The target file path to copy the file to.</param>
368+ /// <param name="fileMode">The POSIX file mode permission.</param>
369+ /// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
370+ [ PublicAPI ]
371+ TBuilderEntity WithResourceMapping ( Uri source , FileInfo target , UnixFileModes fileMode = Unix . FileMode644 ) ;
372+
300373 /// <summary>
301374 /// Assigns the mount configuration to manage data in the container.
302375 /// </summary>
0 commit comments