@@ -449,53 +449,62 @@ Paths in Nextflow are backed by the [Java](https://docs.oracle.com/en/java/javas
449
449
The following operations are supported for paths:
450
450
451
451
` / : (Path, String) -> Path `
452
- : Resolve a relative file name against a directory path.
452
+ : Resolves a relative path string against a directory path. Equivalent to ` resolve() ` .
453
453
454
454
` << : (Path, String) `
455
455
: Appends text to a file without replacing existing content. Equivalent to ` append() ` .
456
456
457
457
<h3 >Getting attributes</h3 >
458
458
459
- The following methods are useful for getting attributes of a file :
459
+ The following methods are useful for getting attributes of a path :
460
460
461
461
` exists() -> boolean `
462
- : Returns ` true ` if the file exists.
462
+ : Returns ` true ` if the path exists.
463
463
464
464
` getBaseName() -> String `
465
- : Gets the file name without its extension, e.g. ` /some/path/file.tar.gz ` -> ` file.tar ` .
465
+ : Gets the path name without its extension, e.g. ` /some/path/file.tar.gz ` -> ` file.tar ` .
466
466
467
467
` getExtension() -> String `
468
- : Gets the file extension, e.g. ` /some/path/file.txt ` -> ` txt ` .
468
+ : Gets the path extension, e.g. ` /some/path/file.txt ` -> ` txt ` .
469
469
470
470
` getName() -> String `
471
- : Gets the file name, e.g. ` /some/path/file.txt ` -> ` file.txt ` .
471
+ : Gets the path name, e.g. ` /some/path/file.txt ` -> ` file.txt ` .
472
472
473
473
` getSimpleName() -> String `
474
- : Gets the file name without any extension, e.g. ` /some/path/file.tar.gz ` -> ` file ` .
474
+ : Gets the path name without any extension, e.g. ` /some/path/file.tar.gz ` -> ` file ` .
475
475
476
476
` getParent() -> Path `
477
- : Gets the file parent path, e.g. ` /some/path/file.txt ` -> ` /some/path ` .
477
+ : Gets the path parent path, e.g. ` /some/path/file.txt ` -> ` /some/path ` .
478
478
479
479
` getScheme() -> String `
480
- : Gets the file URI scheme, e.g. ` s3://some-bucket/hello.txt ` -> ` s3 ` .
480
+ : Gets the path URI scheme, e.g. ` s3://some-bucket/hello.txt ` -> ` s3 ` .
481
481
482
482
` isDirectory() -> boolean `
483
- : Returns ` true ` if the file is a directory.
483
+ : Returns ` true ` if the path is a directory.
484
484
485
485
` isEmpty() -> boolean `
486
- : Returns ` true ` if the file is empty or does not exist.
486
+ : Returns ` true ` if the path is empty or does not exist.
487
487
488
488
` isFile() -> boolean `
489
- : Returns ` true ` if it is a regular file (i.e. not a directory).
489
+ : Returns ` true ` if the path is a file (i.e. not a directory).
490
490
491
491
` isHidden() -> boolean `
492
- : Returns ` true ` if the file is hidden.
492
+ : Returns ` true ` if the path is hidden.
493
493
494
494
` isLink() -> boolean `
495
- : Returns ` true ` if the file is a symbolic link.
495
+ : Returns ` true ` if the path is a symbolic link.
496
496
497
497
` lastModified() -> long `
498
- : Returns the file last modified timestamp in Unix time (i.e. milliseconds since January 1, 1970).
498
+ : Returns the path last modified timestamp in Unix time (i.e. milliseconds since January 1, 1970).
499
+
500
+ ` relativize(other: Path) -> Path `
501
+ : Returns the relative path between this path and the given path.
502
+
503
+ ` resolve(other: String) -> Path `
504
+ : Resolves the given path string against this path.
505
+
506
+ ` resolveSibling(other: String) -> Path `
507
+ : Resolves the given path string against this path's parent path.
499
508
500
509
` size() -> long `
501
510
: Gets the file size in bytes.
0 commit comments