@Override
  public void execute() throws Exception {
    if (!FileUtil.symlinksSupported()) {
      return; // no symbolic links on Windows
    }

    File inFolder = pickFolder(3121);
    File symlinkFile = new File(inFolder + "/newFile-" + Math.random());

    log(this, symlinkFile.getAbsolutePath());

    FileUtil.createSymlink("/does/not/exist", symlinkFile);
  }
  @Override
  public void execute() throws Exception {
    if (!EnvironmentUtil.symlinksSupported()) {
      return; // no symbolic links on Windows
    }

    File file = pickFile(1782);

    log(this, file.getAbsolutePath());

    file.delete();
    FileUtil.createSymlink("/etc/init.d", file);
  }
예제 #3
0
  @Override
  public void execute() throws Exception {
    if (!FileUtil.symlinksSupported()) {
      return; // no symbolic links on Windows
    }

    File symlinkFile =
        pickFileOrFolder(
            2121,
            new FileFilter() {
              @Override
              public boolean accept(File file) {
                return FileUtil.isSymlink(file);
              }
            });

    log(this, symlinkFile.getAbsolutePath());

    symlinkFile.delete();
    FileUtil.createSymlink("/does/not/exist/" + Math.random(), symlinkFile);
  }