@@ -11,6 +11,7 @@ import java.nio.file.{Path => _, _}
1111import java .nio .file .attribute .{FileAttribute , PosixFilePermission , PosixFilePermissions }
1212
1313import scala .util .Try
14+ import scala .annotation .unroll
1415
1516/**
1617 * Create a single directory at the specified path. Optionally takes in a
@@ -174,7 +175,7 @@ object copy {
174175 replaceExisting : Boolean = false ,
175176 copyAttributes : Boolean = false ,
176177 createFolders : Boolean = false ,
177- mergeFolders : Boolean = false
178+ @ unroll mergeFolders : Boolean = false
178179 ): Unit = {
179180 if (createFolders) makeDir.all(to / up)
180181 val opts1 =
@@ -205,29 +206,6 @@ object copy {
205206 if (stat(from, followLinks = followLinks).isDir) walk(from).map(copyOne)
206207 }
207208
208- /** This overload is only to keep binary compatibility with older os-lib versions. */
209- @ deprecated(
210- " Use os.copy(from, to, followLinks, replaceExisting, copyAttributes, " +
211- " createFolders, mergeFolders) instead" ,
212- " os-lib 0.7.5"
213- )
214- def apply (
215- from : Path ,
216- to : Path ,
217- followLinks : Boolean ,
218- replaceExisting : Boolean ,
219- copyAttributes : Boolean ,
220- createFolders : Boolean
221- ): Unit = apply(
222- from = from,
223- to = to,
224- followLinks = followLinks,
225- replaceExisting = replaceExisting,
226- copyAttributes = copyAttributes,
227- createFolders = createFolders,
228- mergeFolders = false
229- )
230-
231209 /**
232210 * Copy a file into a particular folder, rather
233211 * than into a particular path
@@ -240,7 +218,7 @@ object copy {
240218 replaceExisting : Boolean = false ,
241219 copyAttributes : Boolean = false ,
242220 createFolders : Boolean = false ,
243- mergeFolders : Boolean = false
221+ @ unroll mergeFolders : Boolean = false
244222 ): Unit = {
245223 os.copy(
246224 from,
@@ -252,29 +230,6 @@ object copy {
252230 mergeFolders
253231 )
254232 }
255-
256- /** This overload is only to keep binary compatibility with older os-lib versions. */
257- @ deprecated(
258- " Use os.copy.into(from, to, followLinks, replaceExisting, copyAttributes, " +
259- " createFolders, mergeFolders) instead" ,
260- " os-lib 0.7.5"
261- )
262- def apply (
263- from : Path ,
264- to : Path ,
265- followLinks : Boolean ,
266- replaceExisting : Boolean ,
267- copyAttributes : Boolean ,
268- createFolders : Boolean
269- ): Unit = apply(
270- from = from,
271- to = to,
272- followLinks = followLinks,
273- replaceExisting = replaceExisting,
274- copyAttributes = copyAttributes,
275- createFolders = createFolders,
276- mergeFolders = false
277- )
278233 }
279234
280235 /**
0 commit comments