Sets initial attributes on the given file. Sets default attributes first, then attempts to set
the given user-provided attributes.
551667
void setInitialAttributes(File file, FileAttribute<?>... attrs) {
    state.checkOpen();
    attributes.setInitialAttributes(file, attrs);
  }
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
1019103
public static final void setStringAttribute(Path path, String attribute, String value, LinkOption... options) throws IOException
    {
        attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute;
        if (value != null)
        {
            Files.setAttribute(path, attribute, value.getBytes(UTF_8), options);
        }
        else
        {
            Files.setAttribute(path, attribute, null, options);
        }
    }
1034278
public OTAUpdateFile withAttributes(java.util.Map<String, String> attributes) {
        setAttributes(attributes);
        return this;
    }
1372166
def initialize_attributes(caller, raw)
      # Save the interface and parent
      write_attribute(:parent, caller)
      write_attribute(:interface, raw)

      # Load the attributes from the interface
      load_interface_attributes(interface)

      # Get the relationships setup
      populate_relationship(:network_interfaces, interface)

      # Clear dirty and mark as existing
      clear_dirty!
      existing_record!
    end
526523
public void setAttribute(File file, String attribute, Object value, boolean create) {
    String view = getViewName(attribute);
    String attr = getSingleAttribute(attribute);
    setAttributeInternal(file, view, attr, value, create);
  }
274124
def initialize_attributes(attributes)
      @_attributes = attributes
      attributes.each do |key, value|
        send("#{key}=", value) if respond_to? key
      end
    end
908547
protected function initDefaultFiles()
    {
        $logDir = $this->getParam(DirectoryKeys::VAR_LOG) . DIRECTORY_SEPARATOR;
        $this->setParam(FileKeys::APPSERVER_ERRORS_LOG, ParamNode::TYPE_STRING, $logDir . 'appserver-errors.log');
        $this->setParam(FileKeys::APPSERVER_ACCESS_LOG, ParamNode::TYPE_STRING, $logDir . 'appserver-access.log');
    }
860290
def _set_attributes(self):
        
        # turn config dict into nested objects
        config = obj(self._config_dict)
        # set the attributes onto instance
        for k, v in self._config_dict.items():
            setattr(self, k, getattr(config, k))
1094773
def init (self, base_ref, base_url, parent_url, recursion_level,
              aggregate, line, column, page, name, url_encoding, extern):
        """"""
        super(FileUrl, self).init(base_ref, base_url, parent_url,
         recursion_level, aggregate, line, column, page, name, url_encoding, extern)
        self.scheme = u'file'
703519
public void setAttribute(
      JimfsPath path, String attribute, Object value, Set<? super LinkOption> options)
      throws IOException {
    File file = lookUpWithLock(path, options).requireExists(path).file();
    store.setAttribute(file, attribute, value);
  }
772293
def _init_file(self):
        """"""
        header_length = 2*SECTOR_LENGTH
        if self.size > header_length:
            self.file.truncate(header_length)
        self.file.seek(0)
        self.file.write(header_length*b'\x00')
        self.size = header_length
787023
def _initialize_attributes(self, data):
    """"""
    attrs = dict(self.attrs)

    if self.primary_key_name is None:
      pass
    elif isinstance(self.primary_key_name, str):
      if self.primary_key_name not in attrs:
        attrs[self.primary_key_name] = None
    else:
      for pkey in self.primary_key_name:
        if pkey not in attrs:
          attrs[pkey] = None

    if self.timestamps:
      for ts_name in self.timestamps:
        if ts_name is not None and ts_name not in attrs:
          attrs[ts_name] = None

    for attr_name in attrs:
      setattr(self, attr_name, get_value(data, attr_name, attrs[attr_name]))
514913
def set_attributes(self, **kwargs):
        
        for field, value in kwargs.items():
            if field in self.Meta.attributes:
                setattr(self, field, value)
60515
def set_defaults(self):
        """"""

        for const_name, c in file_classes.items():
            if c.multiplicity == '1':
                f = self.file(const_name)
                if not f.record.unpacked_contents:
                    f.setcontent(f.default)
1142777
def _init(self):
        """"""
        read_values = []
        read = self._file.read
        last = read(1)
        current = read(1)
        while last != b'' and current != b'' and not \
                (last == b'\r' and current == b'\n'):
            read_values.append(last)
            last = current
            current = read(1)
        if current == b'' and last != b'\r':
            read_values.append(last)
        self._bytes = b''.join(read_values)
982765
def set_initial_conditions(self, initial_distribution=None,
                               samples_file=None):
        
        self.set_p0(samples_file=samples_file, prior=initial_distribution)
        # if a samples file was provided, use it to set the state of the
        # sampler
        if samples_file is not None:
            self.set_state_from_file(samples_file)