Copies the file path to the clipboard
171661
def copy_path_to_clipboard(self):
        
        path = self.get_current_path()
        QtWidgets.QApplication.clipboard().setText(path)
        debug('path copied: %s' % path)
1064253
def pickFilepath( self ):
        
        mode = self.filepathMode()
        
        filepath = ''
        filepaths = []
        curr_dir = nativestring(self._filepathEdit.text())
        if ( not curr_dir ):
            curr_dir = QDir.currentPath()
        
        if mode == XFilepathEdit.Mode.SaveFile:
            filepath = QFileDialog.getSaveFileName( self,
                                                    self.windowTitle(),
                                                    curr_dir,
                                                    self.filepathTypes() )
                                                    
        elif mode == XFilepathEdit.Mode.OpenFile:
            filepath = QFileDialog.getOpenFileName( self,
                                                    self.windowTitle(),
                                                    curr_dir,
                                                    self.filepathTypes() )
        
        elif mode == XFilepathEdit.Mode.OpenFiles:
            filepaths = QFileDialog.getOpenFileNames( self,
                                                      self.windowTitle(),
                                                      curr_dir,
                                                      self.filepathTypes() )
        
        else:
            filepath = QFileDialog.getExistingDirectory( self,
                                                         self.windowTitle(),
                                                         curr_dir )
        
        if filepath:
            if type(filepath) == tuple:
                filepath = filepath[0]
            self.setFilepath(nativestring(filepath))
        elif filepaths:
            self.setFilepaths(map(str, filepaths))
346474
def dump_to_path(self, cnf, filepath, **kwargs):
        
        with self.wopen(filepath) as out:
            out.write(self.dump_to_string(cnf, **kwargs))
665254
def _copy_file(self, path):
        
        full_path = self.get_full_archive_path(path)
        # Try to make the dir, eat exception if it fails
        try:
            os.makedirs(os.path.dirname(full_path))
        except OSError:
            pass
        logger.debug("Copying %s to %s", path, full_path)
        shutil.copyfile(path, full_path)
        return path
503201
def _paste(self, sources, destination, copy):
        
        for src in sources:
            debug('%s <%s> to <%s>' % (
                'copying' if copy else 'cutting', src, destination))
            perform_copy = True
            ext = os.path.splitext(src)[1]
            original = os.path.splitext(os.path.split(src)[1])[0]
            filename, status = QtWidgets.QInputDialog.getText(
                self.tree_view, _('Copy'), _('New name:'),
                QtWidgets.QLineEdit.Normal, original)
            if filename == '' or not status:
                return
            filename = filename + ext
            final_dest = os.path.join(destination, filename)
            if os.path.exists(final_dest):
                rep = QtWidgets.QMessageBox.question(
                    self.tree_view, _('File exists'),
                    _('File <%s> already exists. Do you want to erase it?') %
                    final_dest,
                    QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                    QtWidgets.QMessageBox.No)
                if rep == QtWidgets.QMessageBox.No:
                    perform_copy = False
            if not perform_copy:
                continue
            try:
                if os.path.isfile(src):
                    shutil.copy(src, final_dest)
                else:
                    shutil.copytree(src, final_dest)
            except (IOError, OSError) as e:
                QtWidgets.QMessageBox.warning(
                    self.tree_view, _('Copy failed'), _('Failed to copy "%s" to "%s".\n\n%s' %
                                                        (src, destination, str(e))))
                _logger().exception('failed to copy "%s" to "%s', src,
                                    destination)
            else:
                debug('file copied %s', src)
            if not copy:
                debug('removing source (cut operation)')
                if os.path.isfile(src):
                    os.remove(src)
                else:
                    shutil.rmtree(src)
                self.tree_view.files_renamed.emit([(src, final_dest)])
410190
def copy_file(self, path):
        
        if "*" in path:
            paths = _expand_paths(path)
            if paths:
                for path in paths:
                    self._copy_file(path)
        else:
            if os.path.isfile(path):
                return self._copy_file(path)
            else:
                logger.debug("File %s does not exist", path)
                return False
474178
def copy_file(self, path, prefixed_path, source_storage):
        
        if (settings.STATICFILES_STORAGE == 'cloudinary_storage.storage.StaticCloudinaryStorage' or
                self.upload_unhashed_files):
            super(Command, self).copy_file(path, prefixed_path, source_storage)
1247143
def copy_path(self, path):
        
        src = os.path.expandvars(os.path.expanduser(path))
        basename = os.path.basename(src)
        dest_path = os.path.expandvars(os.path.expanduser(
            os.path.join(self.curr_work_path, basename)))
        if os.path.isdir(dest_path):
            shutil.rmtree(dest_path)
        if os.path.isdir(src):
            try:
                shutil.copytree(src, dest_path)
            except shutil.Error:
                pass  # There are permissions errors to copy
        elif os.path.isfile(src):
            shutil.copy(src, dest_path)
        else:
            raise UserWarning(
                "Just directory or file is supported to copy [%s]" % src)
        return os.path.relpath(dest_path, self.curr_work_path)
1082264
def copy(self, cursor, f):
        
        logger.info("Inserting file: %s", f)
        colnames = ''
        if self.columns and len(self.columns) > 0:
            colnames = ",".join([x[0] for x in self.columns])
            colnames = '({})'.format(colnames)

        cursor.execute("""
         COPY {table} {colnames} from '{source}'
         CREDENTIALS '{creds}'
         {options}
         ;""".format(
            table=self.table,
            colnames=colnames,
            source=f,
            creds=self._credentials(),
            options=self.copy_options)
        )
1248965
function copyFile (src, done) {
        var dest = path.join(outdir, path.relative(compiler.dirname, src))
        var dirname = utils.dirname(dest)

        if (dirname === dest) {
          copy(src, dest, compiler.dirname, done)
        } else {
          mkdirp(dirname, function (err) {
            if (err) return done(err)
            copy(src, dest, compiler.dirname, done)
          })
        }
      }
657209
def save(self, path):
        ''' 
        '''
        self.clip.write_audiofile(path, fps=self.sampling_rate)
430761
function copyReadmeFiles() {
    const resolvedSrcReadmePaths = path.resolve(rootDir, srcReadmePaths);

    glob(resolvedSrcReadmePaths, void(0), function(error, files) {
        files.forEach((filePath) => {
        const destReadmePath = filePath.replace(/(\bsrc\b)(?!.*\1)/, destDir);
            fs.copyFileSync(filePath, destReadmePath);
        });
    });
}
479069
def dump_to_path(self, cnf, filepath, **kwargs):
        
        with self.wopen(filepath) as out:
            self.dump_to_stream(cnf, out, **kwargs)
1155491
function copyReadmeFiles() {

    const resolvedSrcReadmePaths = path.resolve(rootDir, srcReadmePaths);

    dryRun ? console.log(`In ${destDir}, this script would...`) : console.log(`In ${destDir}...`);

    fs.readdir('packages', (err, files) => {
        totalDocsCount = files.length;
    });

    createDirectory(destDir);
    glob(resolvedSrcReadmePaths, {realpath:true}, function(error, srcFiles) {
        
        srcFiles.forEach((srcReadmePath) => {    
            createDestReadme(srcReadmePath);
            const srcDirPath = path.dirname(srcReadmePath);
            const lastSrcDir = srcDirPath.split(path.sep).pop();
            sidebarEntries.push(`en/packages/${lastSrcDir}/index`);
        });

        console.log(chalk.green(`${updatedDocsCount} of ${totalDocsCount} package readme.md files updated`));
        updateSidebar();
       
    });

}
905760
def copy_region_to_clipboard(self): # ()
        '''
        if self.enable_win32_clipboard:
                mark = min(self.mark, len(self.line_buffer))
                cursor = min(self.point, len(self.line_buffer))
                if self.mark == -1:
                        return
                begin = min(cursor, mark)
                end = max(cursor, mark)
                toclipboard = u"".join(self.line_buffer[begin:end])
                clipboard.SetClipboardText(toclipboard)
688527
def copy_file(self, from_path, to_path, replace=False):
        
        f = self.get_file(from_path)
        if f.copy(to_path, replace):
            self.set_cache_buster(to_path, f.hash())
731919
def paste(**kwargs):
    """"""

    clip.OpenClipboard() 
    d = clip.GetClipboardData(win32con.CF_UNICODETEXT)
    clip.CloseClipboard() 
    return d