Anonymizes any DICOM files found at the given path (file or directory)
 with the settings of this Anonymizer instance.

 @param [String] path a file or directory path
8705
def anonymize_path(path)
      if @tags.length > 0
        prepare_anonymization
        files = DICOM.load_files(path)
        logger.info("#{files.length} DICOM files have been prepared for anonymization.")
        files.each do |f|
          dcm = anonymize_file(f)
          write(dcm)
        end
      else
        logger.warn("No tags have been selected for anonymization. Aborting anonymization.")
      end
      # Save the audit trail (if used):
      @audit_trail.write(@audit_trail_file) if @audit_trail
      logger.info("Anonymization complete.")
    end
122523
def in_source_dir(*paths)
      paths.reduce(source) do |base, path|
        Bunto.sanitized_path(base, path)
      end
    end
272761
def delete(path, options = {}, headers = {}, raw = false)
      request(:delete, path, options, headers, raw)
    end
1178972
function(/**Array*/ path) {
		if (path.constructor != Array) path = path.split(/[\\\/]/);
		var make = "";
		for (var i = 0, l = path.length; i < l; i++) {
			make += path[i] + SYS.slash;
			if (! IO.exists(make)) {
				IO.makeDir(make);
			}
		}
	}
1095294
def ca_file=(path)
      ssl_context.ca_file = path
      ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER unless path.nil?
    end
828256
function set_path($config_path)
	{
		if (!empty($config_path)) {
			if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
				$this->_trigger_error_msg("Bad config file path '$config_path'");
				return;
			}
			if(substr($config_path, -1) != DIRECTORY_SEPARATOR) {
				$config_path .= DIRECTORY_SEPARATOR;
			}

			$this->_config_path = $config_path;
		}
	}
798814
public void copy(File path) {
        FileFilter filter = new FileFilter() {
            @Override
            public boolean accept(File file) {
                return (!config.getAssetIgnoreHidden() || !file.isHidden()) && (file.isFile() || FileUtil.directoryOnlyIfNotIgnored(file));
            }
        };
        copy(path, config.getDestinationFolder(), filter);
    }
766043
def glob(path)
      path = path.tr('\\', '/') if windows?
      if block_given?
        Dir.glob(path) {|f| yield(f)}
      else
        Dir.glob(path)
      end
    end
1002634
def mount(path, opts = {})
      route, folder = path.first

      #
      # if path has more than the one option (:route => :folder),
      # then incorporate the rest of the hash into our opts
      #
      if path.size > 1
        other_opts = path.dup
        other_opts.delete(route)
        opts = opts.merge(other_opts)
      end

      application.mount(route, opts.merge({:path => folder}))
    end
365130
def load_directory(path)

      unless File.directory?(path)
        raise "Konfig couldn't load because it was unable to access #{ path }. Please make sure the directory exists and has the correct permissions."
      end

      Dir[File.join(path, "*.yml")].each { |f| load_file(f) }
    end
181353
def normalize_path(path)
      raise "abnormal path `#{path}'" if path[0] != ?/
      ret = path.dup

      ret.gsub!(%r{/+}o, '/')                    # //      => /
      while ret.sub!(%r'/\.(?:/|\Z)', '/'); end  # /.      => /
      while ret.sub!(%r'/(?!\.\./)[^/]+/\.\.(?:/|\Z)', '/'); end # /foo/.. => /foo

      raise "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret
      ret
    end
304527
def write(dcm)
      if @write_path
        # The DICOM object is to be written to a separate directory. If the
        # original and the new directories have a common root, this is taken into
        # consideration when determining the object's write path:
        path = destination(dcm)
        if @random_file_name
          file_name = "#{SecureRandom.hex(16)}.dcm"
        else
          file_name = File.basename(dcm.source)
        end
        dcm.write(File.join(path, file_name))
      else
        # The original DICOM file is overwritten with the anonymized DICOM object:
        dcm.write(dcm.source)
      end
    end
844259
def comply(self, path):
        
        dirname = os.path.dirname(path)
        if not os.path.exists(dirname):
            os.makedirs(dirname)

        self.pre_write()
        render_and_write(self.template_dir, path, self.context())
        utils.ensure_permissions(path, self.user, self.group, self.mode)
        self.run_service_actions()
        self.save_checksum(path)
        self.post_write()
813533
public function obfuscateDirectory(string $path) : bool
    {
        $this->plain_path = rtrim($path, "/");
        if (is_dir($this->plain_path) === false) {
            $this->addErrorMessage("The specified directory does not exist");
            return false;
        }

        if (is_readable($this->plain_path) == false) {
            $this->addErrorMessage("No permissions to read directory");
            return false;
        }

        if ($this->isObfuscatedDirectory($this->plain_path) == true) {
            $this->addRuntimeMessage("The specified directory is already obfuscated");
            return false;
        }

        return true;
    }
1213815
def save(output_path)
      output_path = File.expand_path(output_path)

      create_epub do
        mimetype = Zip::ZipOutputStream::open(output_path) do |os|
          os.put_next_entry("mimetype", nil, nil, Zip::ZipEntry::STORED, Zlib::NO_COMPRESSION)
          os << "application/epub+zip"
        end
        zipfile = Zip::ZipFile.open(output_path)
        Dir.glob('**/*').each do |path|
          zipfile.add(path, path)
        end
        zipfile.commit
      end
      FileUtils.remove_entry_secure dir
    end
1131187
public function allowDirectory($path)
	{
		if (is_array($path))
			foreach ($path as $dir)
				$this->allowedDirectories[realpath($dir)] = true;
		else
			$this->allowedDirectories[realpath($path)] = true;
	}
308050
public static function createDir($path)
    {
        if (!file_exists($path)){
            self::createDir(dirname($path));
            mkdir($path, 0777);
            chmod($path,0777);
        }
    }