Append volume a file/dir mapping to the runtime option list.
340647
def add_file_or_directory_volume(self,
                                     runtime,         # type: List[Text]
                                     volume,          # type: MapperEnt
                                     host_outdir_tgt  # type: Optional[Text]
                                     ):  # type: (...) -> None
        """"""
        if not volume.resolved.startswith("_:"):
            _check_docker_machine_path(docker_windows_path_adjust(
                volume.resolved))
            self.append_volume(runtime, volume.resolved, volume.target)
436736
def add_dir(self, path, compress):
        
        if not os.path.isdir(path):
            raise ValueError('{} is not a directory'.format(path))
        for root, dirs, files in os.walk(path):
            for f in files:
                self.add_file(os.path.join(root, f), compress)
1004646
def append(self, mode, metric, step, value):
    """"""
    if mode not in self._values:
      self._values[mode] = collections.defaultdict(list)
    self._values[mode][metric].append((step, value))
830596
function(){
		for(var i=0; i<DYNAMIC_FILES.length; i++) {
			addFile(dynamicFilesCompiled[i](options), { name: DYNAMIC_FILES[i] });
		}
	}
1292052
def make_vol_opt(hostdir, contdir, options=None):
    ''''''
    vol = '--volume={}:{}'.format(hostdir, contdir)
    if options != None:
        if isinstance(options, str):
            options = (options,)
        vol += ':' + ','.join(options)
    return vol
939187
function addFilesToData(IOD, IODOpts, apiType, form) {
	_.each(T.maybeToArray(IODOpts.files), function(file) {
		if (apiType === IOD.TYPES.JOB) {
			form.append(file.name, fs.createReadStream(file.path))
		}
		else form.append('file', fs.createReadStream(file))
	})
}
1107511
def addList(self, source_id, dir_path, is_recurcive=False, timestamp_reception=None, training_metadata=[]):
        """"""
        if not path.isdir(dir_path):
            raise ValueError(dir_path + ' is not a directory')
        files_to_send = _get_files_from_dir(dir_path, is_recurcive)
        succeed_upload = {}
        failed_upload = {}
        for file_path in files_to_send:
            try:
                resp = self.add(source_id=source_id,
                    file_path=file_path, profile_reference="",
                    timestamp_reception=timestamp_reception, training_metadata=training_metadata)
                if resp['code'] != 200 and resp['code'] != 201:
                    failed_upload[file_path] = ValueError('Invalid response: ' + str(resp))
                else:
                    succeed_upload[file_path] = resp
            except BaseException as e:
                failed_upload[file_path] = e
        result = {
            'success': succeed_upload,
            'fail': failed_upload
        }
        return result
1078608
def directoryAdd(self, dir_key, key):
    '''
    '''
    key = str(key)

    dir_items = self.get(dir_key) or []
    if key not in dir_items:
      dir_items.append(key)
      self.put(dir_key, dir_items)
282360
def append_file(self, file):
		""""""
		self.files.append(file)

		if self.transformer:
			future = asyncio.ensure_future(self.transformer.transform(file))
			future.add_done_callback(self.handle_transform)
334059
def _append(self, ev_type: Enum, data: ActionLogData) -> None:
        
        event = ActionLogEvent(None, ev_type, data, types=self._event_types)
        with open(self._file_path, mode='a+', newline='') as f:
            f.write(event.pack(delimiter=self._delimiter))
        self._items.append(event)
664521
def cli(env, volume_id, sortby, columns):
    """"""
    file_manager = SoftLayer.FileStorageManager(env.client)
    snapshots = file_manager.get_file_volume_snapshot_list(
        volume_id,
        mask=columns.mask()
    )

    table = formatting.Table(columns.columns)
    table.sortby = sortby

    for snapshot in snapshots:
        table.add_row([value or formatting.blank()
                       for value in columns.row(snapshot)])

    env.fout(table)
258633
def add_volume(self, hostpath, contpath, options=None):
        '''
        '''
        if options is None:
            options = []
        self.volumes.append((hostpath, contpath, options))
591748
def append_to_file(file_name, line_data):
    """"""
    with open(file_name, mode='a', encoding='utf-8') as f1:
        f1.write(line_data)
        f1.write("\n")
235866
def add_file_task(self, dir_name=None):
        ''''''
        file_dialog = Gtk.FileChooserDialog(_('Choose Files..'),
                self.app.window, Gtk.FileChooserAction.OPEN,
                (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                 Gtk.STOCK_OK, Gtk.ResponseType.OK))
        file_dialog.set_modal(True)
        file_dialog.set_select_multiple(True)
        file_dialog.set_default_response(Gtk.ResponseType.OK)
        response = file_dialog.run()
        if response != Gtk.ResponseType.OK:
            file_dialog.destroy()
            return
        source_paths = file_dialog.get_filenames()
        file_dialog.destroy()
        if source_paths:
            self.upload_files(source_paths, dir_name)
301967
def append_to_path (path, directory):
    """"""
    if not os.path.isdir(directory) or directory in path:
        return path
    if not path.endswith(os.pathsep):
        path += os.pathsep
    return path + directory
1021891
def add_volume(self, path):
        
        self.check_not_finalized()
        if self.volumes is None:
            self.volumes = [path]
        else:
            self.volumes.append(path)
1118298
def _append_theme_dir(self, name):
        """"""
        path = "[{}]".format(get_file_directory() + "/" + name)
        self.tk.call("lappend", "auto_path", path)