@@ -22,10 +22,12 @@ import scala.util.Try
2222 * ignore the destination if it already exists, using [[os.makeDir.all ]]
2323 */
2424object makeDir extends Function1 [Path , Unit ] {
25+ @ experimental
2526 def apply (path : Path ): Unit = {
2627 checker.value.onWrite(path)
2728 Files .createDirectory(path.wrapped)
2829 }
30+ @ experimental
2931 def apply (path : Path , perms : PermSet ): Unit = {
3032 checker.value.onWrite(path)
3133 Files .createDirectory(
@@ -41,6 +43,7 @@ object makeDir extends Function1[Path, Unit] {
4143 */
4244 object all extends Function1 [Path , Unit ] {
4345 def apply (path : Path ): Unit = apply(path, null , true )
46+ @ experimental
4447 def apply (path : Path , perms : PermSet = null , acceptLinkedDirectory : Boolean = true ): Unit = {
4548 checker.value.onWrite(path)
4649 // We special case calling makeDir.all on a symlink to a directory;
@@ -82,15 +85,15 @@ object move {
8285 def matching (partialFunction : PartialFunction [Path , Path ]): PartialFunction [Path , Unit ] = {
8386 matching()(partialFunction)
8487 }
88+ @ experimental
8589 def apply (
8690 from : Path ,
8791 to : Path ,
8892 replaceExisting : Boolean = false ,
8993 atomicMove : Boolean = false ,
9094 createFolders : Boolean = false
9195 ): Unit = {
92- checker.value.onRead(from)
93- checker.value.onWrite(from / RelPath .up)
96+ checker.value.onWrite(from)
9497 checker.value.onWrite(to)
9598 if (createFolders && to.segmentCount != 0 ) makeDir.all(to / up)
9699 val opts1 =
@@ -175,6 +178,7 @@ object copy {
175178 matching()(partialFunction)
176179 }
177180
181+ @ experimental
178182 def apply (
179183 from : Path ,
180184 to : Path ,
@@ -319,6 +323,7 @@ object copy {
319323 */
320324object remove extends Function1 [Path , Boolean ] {
321325 def apply (target : Path ): Boolean = apply(target, false )
326+ @ experimental
322327 def apply (target : Path , checkExists : Boolean = false ): Boolean = {
323328 checker.value.onWrite(target)
324329 if (checkExists) {
@@ -330,6 +335,7 @@ object remove extends Function1[Path, Boolean] {
330335 }
331336
332337 object all extends Function1 [Path , Unit ] {
338+ @ experimental
333339 def apply (target : Path ) = {
334340 require(target.segmentCount != 0 , s " Cannot remove a root directory: $target" )
335341 checker.value.onWrite(target)
@@ -360,6 +366,7 @@ object exists extends Function1[Path, Boolean] {
360366 * Creates a hardlink between two paths
361367 */
362368object hardlink {
369+ @ experimental
363370 def apply (link : Path , dest : Path ) = {
364371 checker.value.onWrite(link)
365372 checker.value.onRead(dest)
@@ -371,6 +378,7 @@ object hardlink {
371378 * Creates a symbolic link between two paths
372379 */
373380object symlink {
381+ @ experimental
374382 def apply (link : Path , dest : FilePath , perms : PermSet = null ): Unit = {
375383 checker.value.onWrite(link)
376384 checker.value.onRead(dest match {
0 commit comments