Create a new object with a given _path_.
 Use Service#export to export it.
 Dispatch a message _msg_ to call exported methods
183572
def dispatch(msg)
      case msg.message_type
      when Message::METHOD_CALL
        reply = nil
        begin
          if !intfs[msg.interface]
            raise DBus.error("org.freedesktop.DBus.Error.UnknownMethod"),
                  "Interface \"#{msg.interface}\" of object \"#{msg.path}\" doesn't exist"
          end
          meth = intfs[msg.interface].methods[msg.member.to_sym]
          if !meth
            raise DBus.error("org.freedesktop.DBus.Error.UnknownMethod"),
                  "Method \"#{msg.member}\" on interface \"#{msg.interface}\" of object \"#{msg.path}\" doesn't exist"
          end
          methname = Object.make_method_name(msg.interface, msg.member)
          retdata = method(methname).call(*msg.params)
          retdata = [*retdata]

          reply = Message.method_return(msg)
          meth.rets.zip(retdata).each do |rsig, rdata|
            reply.add_param(rsig.type, rdata)
          end
        rescue => ex
          dbus_msg_exc = msg.annotate_exception(ex)
          reply = ErrorMessage.from_exception(dbus_msg_exc).reply_to(msg)
        end
        @service.bus.message_queue.push(reply)
      end
    end
749492
def prepare_message(self, message):
        

        message.meta.update(path=self.path)

        for handler in self.handlers:
            handler.outgoing(message, self)

        return message
1344923
def import_tasks(self, path):
        
        for zz in os.walk(path):
            for module in zz[2]:

                if module.endswith('.py'):

                    import importlib

                    # from tasks.message_popup import *



                    importlib.import_module('tasks.' + module[:-3])

                    print 'imported', module
1333337
def export_metadata(self, path):
        
        writer = pd.ExcelWriter(path)
        write_sheet(writer, 'meta', self.meta, index=True)
        writer.save()
177360
function Call(path) {
  if (typeof path !== 'string' || arguments.length > 1) { throw new Error('Property decorators can be used for single property access') }
  return createDecorator((options, key) => {
    if (!options.methods) options.methods = {}
    options.methods[key] = call(path)
  })
}
905860
private File createNewFile(String path) throws IOException {

		// In windows, pathnames with spaces are returned as %20
		if (path.contains("%20"))
			path = path.replaceAll("%20", " ");
		File newFile = new File(path);

		if (!newFile.exists() && !newFile.createNewFile()) {
			throw new BundlingProcessException("Unable to create a temporary file at " + path);
		}

		if (LOGGER.isDebugEnabled())
			LOGGER.debug("Created file: " + newFile.getCanonicalPath());
		return newFile;
	}
933356
def from_path(cls, path):
        
        name = path.name[:-3]
        with logs.debug_time(u'Importing rule: {};'.format(name)):
            rule_module = load_source(name, str(path))
            priority = getattr(rule_module, 'priority', DEFAULT_PRIORITY)
        return cls(name, rule_module.match,
                   rule_module.get_new_command,
                   getattr(rule_module, 'enabled_by_default', True),
                   getattr(rule_module, 'side_effect', None),
                   settings.priority.get(name, priority),
                   getattr(rule_module, 'requires_output', True))
1200154
def create(cls, path):
        """"""
        try:
            os.makedirs(path)
        except OSError as e:
            if not e.errno == errno.EEXIST:
                raise
        cmd = [SVNADMIN, 'create', path]
        subprocess.check_call(cmd)
        return cls(path)
1153239
def _create_file(path=''):
        '''  '''
        from os.path import isfile
        if not isfile(path): # only do the following if the file doesn't exist yet
            from os import chmod
            from stat import S_IRUSR, S_IWUSR

            open(path, "a").close()  # create the file
            attempt(lambda: chmod(path, (S_IRUSR | S_IWUSR)))
79486
def create(path)
      self.destination_root = path

      copy_file(".gitignore")
      copy_file("config.ru")
      copy_file("Gemfile")
      copy_file("Procfile")
      copy_file("README.md")

      copy_content
      copy_themes
    end
980847
def create_from_file(file_path)
      client_setup
      resource = OneviewSDK::Resource.from_file(@client, file_path)
      fail_nice 'Failed to determine resource type!' if resource.class == OneviewSDK::Resource
      existing_resource = resource.class.new(@client, resource.data)
      resource.data.delete('uri')
      if existing_resource.retrieve!
        if options['if_missing']
          puts "Skipped: #{resource.class.name.split('::').last} '#{resource[:name]}' already exists.\n#{existing_resource[:uri]}"
          return
        end
        if existing_resource.like?(resource.data)
          puts "Skipped: #{resource.class.name.split('::').last} '#{resource[:name]}' is up to date.\n#{existing_resource[:uri]}"
          return
        end
        begin
          existing_resource.update(resource.data)
          puts "Updated Successfully!\n#{existing_resource[:uri]}"
        rescue StandardError => e
          fail_nice "Failed to update #{resource.class.name.split('::').last} '#{resource[:name]}': #{e}"
        end
      else
        begin
          resource.create
          puts "Created Successfully!\n#{resource[:uri]}"
        rescue StandardError => e
          fail_nice "Failed to create #{resource.class.name.split('::').last} '#{resource[:name]}': #{e}"
        end
      end
    rescue IncompleteResource => e
      fail_nice "Failed to create #{resource.class.name.split('::').last} '#{resource[:name]}': #{e}"
    rescue SystemCallError => e # File open errors
      fail_nice e
    end
399620
def new_path(model_class, url_params: {})
      url_for url_params.to_h.reverse_merge(
        resources: to_resources_name(model_class),
        action: :new
      )
    end
680927
def create(path, options)
      trello_class = class_from_path(path)
      trello_class.save options do |data|
        data.client = self
      end
    end
1067074
def chat_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/chats"
        return self.call(api_path, method="POST", data=data, **kwargs)
597751
def create_init(self, path):  # type: (str) -> None
        
        source = """# coding=utf-8
\"\"\"
Version
\"\"\"
__version__ = \"0.0.0\"
"""
        with io.open(path, "w", encoding="utf-8") as outfile:
            outfile.write(source)
42098
function (method, path, parameters) {
    if (!this.parent) {
      return;
    }
    var fullPath = normalizePath(path, this.path);
    this.parent.exportHandler(method, fullPath, parameters);
  }
85437
def create(callback=None, path=None, method=Method.POST, resource=None, tags=None, summary="Create a new resource",
           middleware=None):
    # type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
    
    def inner(c):
        op = ResourceOperation(c, path or NoPath, method, resource, tags, summary, middleware)
        op.responses.add(Response(HTTPStatus.CREATED, "{name} has been created"))
        op.responses.add(Response(HTTPStatus.BAD_REQUEST, "Validation failed.", Error))
        return op
    return inner(callback) if callback else inner