Copy the icon to the res subdirectory of the cordova build.
972435
function copyIcon() {
		var dest = path.join(process.env.PWD, 'res');

		// Make sure the destination exists
		mkdir(dest);

		return pify(fs.copy.bind(fs), Promise)(src, path.join(dest, 'icon.' + mime.extension(mimetype)));
	}
602552
def copy_resources_to_log_dir(log_dir):
        """"""
        css_path = resource_filename(Requirement.parse("egat"), "/egat/data/default.css")
        header_path = resource_filename(Requirement.parse("egat"), "/egat/data/egat_header.png")
        shutil.copyfile(css_path, log_dir + "/style.css")
        shutil.copyfile(header_path, log_dir + "/egat_header.png")

        return log_dir + os.sep + "style.css"
176303
def set_icon(self, icon, qtgui_module):
        """"""

        if self._use_fallback:
            icon.addFile(self._fallback)
        else:
            for role, pixmap in self._roles.items():
                if role.endswith("off"):
                    mode = role[:-3]
                    state = qtgui_module.QIcon.Off
                elif role.endswith("on"):
                    mode = role[:-2]
                    state = qtgui_module.QIcon.On
                else:
                    continue

                mode = getattr(qtgui_module.QIcon, mode.title())

                if pixmap:
                    icon.addPixmap(qtgui_module.QPixmap(pixmap), mode, state)
                else:
                    icon.addPixmap(qtgui_module.QPixmap(), mode, state)

        self.icon = icon
1026686
def copyFunc(dest, source, env):
    """"""

    if os.path.isdir(source):
        if os.path.exists(dest):
            if not os.path.isdir(dest):
                raise SCons.Errors.UserError("cannot overwrite non-directory `%s' with a directory `%s'" % (str(dest), str(source)))
        else:
            parent = os.path.split(dest)[0]
            if not os.path.exists(parent):
                os.makedirs(parent)
        scons_copytree(source, dest)
    else:
        shutil.copy2(source, dest)
        st = os.stat(source)
        os.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)

    return 0
416509
protected function copyToBuildDir()
    {
        $this->buildInPlace = true;
        $buildDir = $this->buildDir;
        if ($this->app->shouldMoveToRoot()) {
            $buildDir .= '/' . $this->documentRoot;
        }
        if (!empty($this->settings['clone'])) {
            $this->cloneToBuildDir($buildDir);
        } elseif ($this->copy) {
            $this->fsHelper->copyAll($this->appRoot, $buildDir, $this->ignoredFiles, true);
        } else {
            $this->fsHelper->symlink($this->appRoot, $buildDir);
        }

        return $buildDir;
    }
1240687
function copyAssetsLess() {
  return gulp.src(['./src/assets/stylesheets/*.less'])
    .pipe(replace(/\.\.\/.\.\/.\.\//g, function () {
      return '../../../../';
    }))
    .pipe(replace(/@import '\.\.\/\.\.\/.*\//g, function () {
      return '@import \'';
    }))
    .pipe(rename({dirname: ''}))
    .pipe(gulp.dest(libraryDist + '/dist/less'));
}
1275016
function resolveSync (iconPath) {
  var path = resolve(iconPath)
  var stat = fs.statSync(path)

  if (stat.isDirectory()) {
    throw createIsDirError(path)
  }

  return path
}
962052
public void copyResourceToDir(String path, String filename, String dir) {
		String fullpath = path + ProcessorConstants.SEPARATORCHAR + filename;
		messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " javascript copy js : " + fullpath + " to : "+dir);
		try (Writer writer = getFileObjectWriter(dir, "org.ocelotds."+filename)) {
			bodyWriter.write(writer, OcelotProcessor.class.getResourceAsStream(fullpath));
		} catch (IOException ex) {
			messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " FAILED TO CREATE : " + filename);
		}
	}
179647
function (component) {
            var pathParts = component === 'app' ? ['app'] : ['components'];
            if (component !== 'app') {
                pathParts.push(component);
            }
            pathParts.push('assets');

            return path.resolve(LAZO.FILE_REPO_PATH + path.sep + path.join.apply(this, pathParts));
        }
1302500
function icons (opts, ctx, done) {
    return vfs.src(opts.input)
        .pipe(easysvg.stream({js: false}))
        .on('error', done)
        .pipe(vfs.dest(opts.output))
}
109883
function buildIconsObject(svgFiles, getSvg) {
  return svgFiles
    .map(svgFile => {
      const name = path.basename(svgFile, '.svg');
      const svg = getSvg(svgFile);
      const contents = getSvgContents(svg);
      return { name, contents };
    })
    .reduce((icons, icon) => {
      icons[icon.name] = icon.contents;
      return icons;
    }, {});
}
391561
function copy(copiesMap, projectsPath, buildPath) {
            return _.map(copiesMap, function(dstPath, srcPath) {
                if (/\/$/.test(dstPath)) {
                    //copy directory
                    return gulp.src(path.join(projectsPath, srcPath))
                        .pipe(gulp.dest(path.join(buildPath, dstPath)));
                } else {
                    //copy file
                    return gulp.src(path.join(projectsPath, srcPath))
                        .pipe(gulpRename(dstPath))
                        .pipe(gulp.dest(buildPath));
                };
            });
        }
396392
function copyAssets(output, plugin) {
    var logger = output.getLogger();
    var pluginRoot = plugin.getPath();
    var options = output.getOptions();

    var outputRoot = options.get('root');
    var assetOutputFolder = path.join(outputRoot, 'gitbook');
    var prefix = options.get('prefix');

    var assetFolder = path.join(pluginRoot, ASSET_FOLDER, prefix);

    if (!fs.existsSync(assetFolder)) {
        return Promise();
    }

    logger.debug.ln('copy assets from theme', assetFolder);
    return fs.copyDir(
        assetFolder,
        assetOutputFolder,
        {
            deleteFirst: false,
            overwrite: true,
            confirm: true
        }
    );
}
111946
function copyFromDir(starter, root) {
  if (!fs.existsSync(starter)) {
    throw new Error(`starter ${starter} doesn't exist`);
  }

  // Chmod with 755.
  // 493 = parseInt('755', 8)
  return fs.mkdirp(root, {mode: 493}).then(() => {
    console.log(
      `Creating new theme from local starter: ${chalk.green(starter)}`,
    );
    return fs.copy(starter, root, {
      filter: (file) =>
        !/^\.(git|hg)$/.test(path.basename(file)) && !/node_modules/.test(file),
    });
  });
}
397998
function cordova(platform, opts) {
    platform = new Platform(platform);
    var use_git = platform.source === 'git';
    if ( use_git ) {
        return module.exports.cordova_git(platform);
    } else {
        return module.exports.cordova_npm(platform);
    }
}
665854
function maybeCopyIcons(options, appPath, callback) {
  if (!options.icon) {
    callback();
    return;
  }

  if (options.platform === 'darwin' || options.platform === 'mas') {
    callback();
    return;
  }

  // windows & linux
  // put the icon file into the app
  const destIconPath = path.join(appPath, 'resources/app');
  const destFileName = `icon${path.extname(options.icon)}`;
  copy(options.icon, path.join(destIconPath, destFileName), (error) => {
    callback(error);
  });
}
94627
function createIconFiles(srcFile, dest) {
  const thisTaskName = swlog.logSubStart('create icon files');

  return new Promise(resolve => {
    const exportArtboardsOptions = [
      'export',
      'artboards',
      srcFile,
      `--formats=${options.iconFormats.join(',')}`,
      '--include-symbols=NO',
      '--save-for-web=YES',
      `--output=${dest}`
    ];

    const outputStr = sketchtoolExec(exportArtboardsOptions.join(' '));
    resolve(outputStr);
  })
  .then(output => {
    options.iconFormats.forEach(format => {
      const regex = new RegExp(`\\.${format}`, 'g');
      const count = (output.match(regex) || []).length;
      swlog.logTaskAction('Created', `${count} ${format.toUpperCase()} files`);
    })

    swlog.logSubEnd(thisTaskName);

    if (options.iconFormats.indexOf('svg') !== -1) {
      return optimizeSVGs(dest);
    }
  });
}