Add the contents of another directory operation. This is used to record
changes when recuring through directories.

@param op
@param f
519698
public void addDirectoryOperation(DirectoryOperation op, File f) {
		addAll(op.getUpdatedFiles(), updatedFiles);
		addAll(op.getNewFiles(), newFiles);
		addAll(op.getUnchangedFiles(), unchangedFiles);
		addAll(op.getDeletedFiles(), deletedFiles);

		Object obj;
		for (Enumeration e = op.failedTransfers.keys(); e.hasMoreElements();) {
			obj = e.nextElement();
			failedTransfers.put(obj, op.failedTransfers.get(obj));
		}

		recursedDirectories.addElement(f);
	}
42825
public static void populateFilesList(File dir, List<File> filesListInDir) {
		File[] files = dir.listFiles();
		for(File file : files){
			if(file.isFile()){
				filesListInDir.add(file);
			}else{
				populateFilesList(file, filesListInDir);
			}
		}
	}
1250608
public void setOperationInfos(JmxOperationInfo[] operationInfos) {
		if (this.operationInfos == null) {
			this.operationInfos = arrayToList(operationInfos);
		} else {
			for (JmxOperationInfo opertionInfo : operationInfos) {
				this.operationInfos.add(opertionInfo);
			}
		}
	}
1083684
public boolean addSourceFile(FileSystem fs, PolicyInfo info, FileStatus src,
      RaidState.Checker checker, long now, int targetReplication)
      throws IOException {
    RaidState state = checker.check(info, src, now, false);
    Counters counters = stateToSourceCounters.get(state);
    counters.inc(src);
    if (state == RaidState.RAIDED) {
      incRaided(src);
      long paritySize = computeParitySize(src, targetReplication);
      estimatedParitySize += paritySize;
      estimatedDoneParitySize += paritySize;
      estimatedDoneSourceSize += src.getLen() * targetReplication;
      return false;
    }
    if (state == RaidState.NOT_RAIDED_BUT_SHOULD) {
      estimatedDoneParitySize += computeParitySize(src, targetReplication);
      estimatedDoneSourceSize += src.getLen() * targetReplication;
      return true;
    }
    return false;
  }
1150474
def add_file(self,fName,content) :
        """"""
        if not self.isdir() : raise Exception("FSQuery tried to add a file in a node which is not a directory : %s" % self.abs)
        self.write_file("%s/%s"%(self.abs,fName),content)
515853
public void addFile(String filename, String filePath) {
        int pathIndex = filePathList.indexOf(filePath);
        if (pathIndex == -1) {
            fileNameList.add(filename);
            filePathList.add(filePath);
        }
    }
1005788
public final void insertOp(Operation op) {
    ArrayList<Operation> tmp = new ArrayList<Operation>(inputQueue.size() + 1);
    tmp.add(op);
    inputQueue.drainTo(tmp);
    inputQueue.addAll(tmp);
  }
1016800
@Override
    protected void extraFileActions(PackageSymbol pack, JavaFileObject fo) {
        if (fo.isNameCompatible("package", JavaFileObject.Kind.HTML)) {
            pack.sourcefile = fo;
        }
    }
851390
def append_inflation_op(self, source=None):
        
        op = operation.Inflation(source)
        return self.append_op(op)
689057
public void writeToFile(File f) {
		try (FileOutputStream fos = new FileOutputStream(f)) {
			fos.write(write());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
119410
public static void addOrReplaceEntries(final File zip, final ZipEntrySource[] entries) {
    operateInPlace(zip, new InPlaceAction() {
      public boolean act(File tmpFile) {
        addOrReplaceEntries(zip, entries, tmpFile);
        return true;
      }
    });
  }
597926
def _addf(ins):
    ''' 
    '''
    op1, op2 = tuple(ins.quad[2:])

    if _f_ops(op1, op2) is not None:
        opa, opb = _f_ops(op1, op2)
        if opb == 0:  # A + 0 => A
            output = _float_oper(opa)
            output.extend(_fpush())
            return output

    output = _float_oper(op1, op2)
    output.append('call __ADDF')
    output.extend(_fpush())
    REQUIRES.add('addf.asm')
    return output
503641
private void addToReadIndex(StorageOperation operation) {
        try {
            if (operation instanceof StreamSegmentAppendOperation) {
                // Record a StreamSegmentAppendOperation. Just in case, we also support this type of operation, but we need to
                // log a warning indicating so. This means we do not optimize memory properly, and we end up storing data
                // in two different places.
                StreamSegmentAppendOperation appendOperation = (StreamSegmentAppendOperation) operation;
                this.readIndex.append(appendOperation.getStreamSegmentId(),
                        appendOperation.getStreamSegmentOffset(),
                        appendOperation.getData());
            } else if (operation instanceof MergeSegmentOperation) {
                // Record a MergeSegmentOperation. We call beginMerge here, and the StorageWriter will call completeMerge.
                MergeSegmentOperation mergeOperation = (MergeSegmentOperation) operation;
                this.readIndex.beginMerge(mergeOperation.getStreamSegmentId(),
                        mergeOperation.getStreamSegmentOffset(),
                        mergeOperation.getSourceSegmentId());
            } else {
                assert !(operation instanceof CachedStreamSegmentAppendOperation)
                        : "attempted to add a CachedStreamSegmentAppendOperation to the ReadIndex";
            }
        } catch (ObjectClosedException | StreamSegmentNotExistsException ex) {
            // The Segment is in the process of being deleted. We usually end up in here because a concurrent delete
            // request has updated the metadata while we were executing.
            log.warn("Not adding operation '{}' to ReadIndex because it refers to a deleted StreamSegment.", operation);
        }
    }
89187
public void add(Operation other) {
    op.addAllLogEntries(other.getLogEntriesList());
    mergeMetricValues(other);
    mergeTimestamps(other);
  }
1313765
void appendOp(int length, int op)
  {

    int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);

    m_ops.setOp(totalLen, op);
    m_ops.setOp(totalLen + OpMap.MAPINDEX_LENGTH, length);
    m_ops.setOp(OpMap.MAPINDEX_LENGTH, totalLen + length);
  }
751497
private boolean delete(final File f) throws IOException {

		if (f.isDirectory()) {
			final File[] files = f.listFiles();
			if (files != null) {
				for (File file : files) {
					final boolean del = delete(file);
					if (!del) {
						return false;
					}
				}
			}
		} else {
			return f.delete();
		}

		// Now directory is empty
		return f.delete();
	}
395411
public void setWorkDir(String dir) throws IOException
    {
        File workDir = new File(dir);

        if (!workDir.exists() || !workDir.canWrite() || !workDir.canRead())
        {
            throw new IOException("Cannot access directory "+dir);
        }
        _workDir = workDir;
    }