R Under development (unstable) (2023-11-16 r85542 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("R.utils") Loading required package: R.oo Loading required package: R.methodsS3 R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help. R.oo v1.25.0 (2022-06-12 02:20:02 UTC) successfully loaded. See ?R.oo for help. Attaching package: 'R.oo' The following object is masked from 'package:R.methodsS3': throw The following objects are masked from 'package:methods': getClasses, getMethods The following objects are masked from 'package:base': attach, detach, load, save R.utils v2.12.3 successfully loaded. See ?R.utils for help. Attaching package: 'R.utils' The following object is masked from 'package:utils': timestamp The following objects are masked from 'package:base': cat, commandArgs, getOption, isOpen, nullfile, parse, warnings > verbose <- Verbose(threshold=-1) > > options(warn = 1L) > > pathname <- tempfile("foo_", fileext = ".txt") > pathname <- getAbsolutePath(pathname) > cat(file=pathname, "Hello world!\n") > > ## NOTE: Not all systems support creation of links, which is > ## why we need to run the tests using tryCatch(). > > ## Try all methods at once > link <- basename(pathname) > tryCatch({ + linkR <- createLink(link=link, target=pathname) + verbose && cat(verbose, "Link returned: ", linkR) + linkR <- normalizePath(linkR) + link <- normalizePath(link) + if (linkR != link) { + throw("Requested and returned link are not the same: ", sQuote(linkR), " != ", sQuote(link)) + } + }, error = function(ex) { + verbose && cat(verbose, "Failed to create link: ", ex$message) + }) Ihre Berechtigungen reichen nicht aus, um diesen Vorgang auszuführen. Warning in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, : running command 'C:\Windows\system32\cmd.exe /c mklink "foo_1c4e837e057a2.txt" "D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt"' had status 1 Link returned: foo_1c4e837e057a2.txt Warning in normalizePath(path.expand(path), winslash, mustWork) : path[1]="foo_1c4e837e057a2.txt": Das System kann die angegebene Datei nicht finden Warning in normalizePath(path.expand(path), winslash, mustWork) : path[1]="foo_1c4e837e057a2.txt": Das System kann die angegebene Datei nicht finden > > ## One method at the time > methods <- c("unix-symlink", "windows-ntfs-symlink", "windows-shortcut") > for (method in methods) { + verbose && enterf(verbose, "Method '%s'", method) + verbose && cat(verbose, "Target: ", pathname) + link <- sprintf("%s-to-%s", method, basename(pathname)) + verbose && cat(verbose, "Link to create: ", link) + tryCatch({ + linkR <- createLink(link=link, target=pathname, method=method) + verbose && cat(verbose, "Link returned: ", linkR) + linkR <- normalizePath(linkR) + link <- normalizePath(link) + if (linkR != link) { + throw("Requested and returned link are not the same: ", sQuote(linkR), " != ", sQuote(link)) + } + }, error = function(ex) { + verbose && cat(verbose, "Failed to create link: ", ex$message) + }) + verbose && exit(verbose) + } Method 'unix-symlink'... Target: D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt Link to create: unix-symlink-to-foo_1c4e837e057a2.txt Failed to create link: Failed to create file link (methods attempted: 'unix-symlink'; current working directory: 'd:/RCompile/CRANincoming/R-devel/R.utils.Rcheck/tests'): 'unix-symlink-to-foo_1c4e837e057a2.txt'[.lnk] -> 'D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt' Warnings and errors captured: unix-symlink produced simpleWarning: 'cannot symlink 'D:\temp\RtmpkH8ux7\foo_1c4e837e057a2.txt' to 'unix-symlink-to-foo_1c4e837e057a2.txt', reason 'Dem Client fehlt ein erforderliches Recht'' Method 'unix-symlink'...done Method 'windows-ntfs-symlink'... Target: D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt Link to create: windows-ntfs-symlink-to-foo_1c4e837e057a2.txt Ihre Berechtigungen reichen nicht aus, um diesen Vorgang auszuführen. Warning in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, : running command 'C:\Windows\system32\cmd.exe /c mklink "windows-ntfs-symlink-to-foo_1c4e837e057a2.txt" "D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt"' had status 1 Failed to create link: Failed to create file link (methods attempted: 'windows-ntfs-symlink'; current working directory: 'd:/RCompile/CRANincoming/R-devel/R.utils.Rcheck/tests'): 'windows-ntfs-symlink-to-foo_1c4e837e057a2.txt'[.lnk] -> 'D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt' Warnings and errors captured: windows-ntfs-symlink produced Exception: 'Shell command 'mklink "windows-ntfs-symlink-to-foo_1c4e837e057a2.txt" "D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt"' had status 1 (using shell 'C:\Windows\system32\cmd.exe'): ' Method 'windows-ntfs-symlink'...done Method 'windows-shortcut'... Target: D:/temp/RtmpkH8ux7/foo_1c4e837e057a2.txt Link to create: windows-shortcut-to-foo_1c4e837e057a2.txt Link returned: windows-shortcut-to-foo_1c4e837e057a2.txt Warning in normalizePath(path.expand(path), winslash, mustWork) : path[1]="windows-shortcut-to-foo_1c4e837e057a2.txt": Das System kann die angegebene Datei nicht finden Warning in normalizePath(path.expand(path), winslash, mustWork) : path[1]="windows-shortcut-to-foo_1c4e837e057a2.txt": Das System kann die angegebene Datei nicht finden Method 'windows-shortcut'...done > > if (isFile(pathname)) file.remove(pathname) [1] TRUE > > proc.time() user system elapsed 0.45 0.10 1.26