/*
Append content directly to target file's end
762475
public function append($data)
    {
        $content = file_get_contents($this->_filleFullName);
        $data = $content.PHP_EOL.$data;
        $saveToFileRes = file_put_contents($this->_filleFullName, $data);
        return $saveToFileRes;
    }
966263
def append(self, filename_in_zip, file_contents):
        '''
        
        '''
        # Set the file pointer to the end of the file
        self.in_memory_zip.seek(-1, io.SEEK_END)

        # Get a handle to the in-memory zip in append mode
        zf = zipfile.ZipFile(self.in_memory_zip, "a", zipfile.ZIP_DEFLATED, False)

        # Write the file to the in-memory zip
        zf.writestr(filename_in_zip, file_contents)

        # Mark the files as having been created on Windows so that
        # Unix permissions are not inferred as 0000
        for zfile in zf.filelist:
            zfile.create_system = 0

        # Close the ZipFile
        zf.close()

        # Rewind the file
        self.in_memory_zip.seek(0)

        return self
286536
private void appendToFile(RandomAccessFile output, InputStream input)
            throws IOException {
        byte[] buffer = new byte[1024 * 1024];
        int bytesRead = 0;
        do {
            bytesRead = input.read(buffer);
            if (bytesRead < 0)
                break;
            output.write(buffer, 0, bytesRead);
        } while (bytesRead > 0);
        return;
    }
465907
def _append_filename_extension(self, response: BaseResponse):
        ''''''
        if not self._filename:
            return

        if response.request.url_info.scheme not in ('http', 'https'):
            return

        if not re.search(r'\.[hH][tT][mM][lL]?$', self._filename) and \
                HTMLReader.is_response(response):
            self._filename += '.html'
        elif not re.search(r'\.[cC][sS][sS]$', self._filename) and \
                CSSReader.is_response(response):
            self._filename += '.css'
167490
def minify_file(self, target):
        
        html = open(target, 'rb').read()
        enc = chardet.detect(html)['encoding']
        with codecs.open(target, 'r+', enc) as f:
            result = htmlmin.minify(f.read(), **self.options)
            f.seek(0)
            f.write(result)
            f.truncate()
532278
function appendFilename(pathStr, valueToAppend) {
  var pfile = path.parse(pathStr);
  var result = Array.prototype.join.call([
    pfile.dir,
    '/',
    pfile.name,
    valueToAppend,
    pfile.ext
  ], '');
  return result;
}
676101
function insertPastedContent(node, content, overwrite) {
		var nodesWithPlaceholders = node.findAll(function(item) {
			return hasOutputPlaceholder(item);
		});
		
		if (hasOutputPlaceholder(node))
			nodesWithPlaceholders.unshift(node);
		
		if (nodesWithPlaceholders.length) {
			nodesWithPlaceholders.forEach(function(item) {
				item.content = replaceOutputPlaceholders(item.content, content);
				item._attributes.forEach(function(attr) {
					attr.value = replaceOutputPlaceholders(attr.value, content);
				});
			});
		} else {
			// on output placeholders in subtree, insert content in the deepest
			// child node
			var deepest = node.deepestChild() || node;
			if (overwrite) {
				deepest.content = content;
			} else {
				deepest.content = abbrUtils.insertChildContent(deepest.content, content);
			}
		}
	}
557717
public synchronized static void append(File file,String content) throws IOException {
        Writer writer = writerCache.getOrDefault(file.getPath(), new FileWriter(file,true));
        writer.write(content);
        writer.flush();
        writerCache.put(file.getPath(), writer);
    }
597611
function(_path, _type, _str){
        var file = $options.path+"/"+_path+"."+_type;
        $fs.appendFile(file, _str, 'utf8');
    }
359055
function concat(options, callback) {
  var files = options.files.map(function(file, i) {
    return {
      path: node_path.join(lib, file + '.js'),
      index: i
    }
  });

  var contents = [];
  async.each(files, function(task, done) {
    fs.readFile(task.path, function(err, content) {
      if (err) {
        return done(err);
      }

      contents[task.index] = content.toString();
      done(null);
    });

  }, function(err) {
    if (err) {
      return callback(err);
    }

    var intro = options.intro ? options.intro + '\n\n\n' : '';
    var outro = options.outro ? '\n\n\n' + options.outro : '';
    var content = intro + contents.join('\n\n') + outro;
    content = content.replace(/@VERSION/g, concat.version());
    callback(null, content);
  });
}
63808
public LocatedBlock appendFile(String src, String holder, String clientMachine
      ) throws IOException {
    return appendFile(src, holder, clientMachine, BlockMetaInfoType.NONE);
  }
38563
function appendSimpleFile( $key, $filepath )
    {
        if ( !isset( $this->Parameters['simple-file-list'] ) )
        {
            $this->Parameters['simple-file-list'] = array();
        }

        $suffix = eZFile::suffix( $filepath );
        //$sourcePath = $fileInfo['original-path'];
        $packagePath = eZPackage::simpleFilesDirectory() . '/' . substr( md5( mt_rand() ), 0, 8 ) . '.' . $suffix;
        $destinationPath = $this->path() . '/' . $packagePath;
        eZDir::mkdir( eZDir::dirpath( $destinationPath ), false, true );

       //SP DBfile
        $fileHandler = eZClusterFileHandler::instance();
        $fileHandler->fileFetch( $filepath );

        eZFileHandler::copy( $filepath, $destinationPath );

        $this->Parameters['simple-file-list'][$key] = array( 'original-path' => $filepath,
                                                             'package-path' => $packagePath );
    }
704279
def append_file_data(_dir, data)
      File.open(to_path, 'ab') { |file| file.write(data) }
    end
1191981
function appendLine(num, content, prefix) {
    sb.append(prefix + lineNumbers[num] + ' | ' + content + '\n');
  }
1082679
function append($path, $contents, $owner = null)
    {
        file_put_contents($path, $contents, FILE_APPEND);

        if ($owner) {
            $this->chown($path, $owner);
        }
    }
257467
def append(self, value):
        
        # Pack value
        data = self.pack(value)

        # End of file
        self.__file.seek(0, 2)

        # Write packed value
        self.__file.write(data)
239592
function browserifyTransform(file) {
    var chunks = [];

    var write = function(buffer) {
      chunks.push(buffer);
    };

    var end = function() {
      var content = Buffer.concat(chunks).toString('utf8');
      // convention fileName == key for shim options
      var fileName = file.match(/([^\/]+)(?=\.\w+$)/)[0];
      this.queue(commonjsify(content, options[fileName]));
      this.queue(null);
    };

    return through(write, end);
  }