code: INodeFileUnderConstruction addFile(String path,
                  String[] names,
                  byte[][] components,
                  INode[] inodes,
                  PermissionStatus permissions,
                  short replication,
                  long preferredBlockSize,
                  String clientName,
                  String clientMachine,
                  DatanodeDescriptor clientNode,
                  long generationStamp,
                  long accessTime)
                  throws IOException {
      waitForReady();
  
      // Always do an implicit mkdirs for parent directory tree.
      long modTime = FSNamesystem.now();
      if (inodes[inodes.length-2] == null) { // non-existent directory
        if (!mkdirs(names[names.length-1],
            names, components, inodes, inodes.length-1,
            permissions, true, modTime)) {
          return null;
        }
      } else if (!inodes[inodes.length-2].isDirectory()) {
        NameNode.stateChangeLog.info("DIR* FSDirectory.addFile: "
            + "failed to add " + path + " as its parent is not a directory");
        throw new FileNotFoundException("Parent path is not a directory: " + path);
      }
      
      if (accessTime == -1){
      	accessTime = modTime;
      }
      INodeFileUnderConstruction newNode = new INodeFileUnderConstruction(
                                   allocateNewInodeId(),
                                   permissions,replication,
                                   preferredBlockSize, modTime, accessTime, clientName, 
                                   clientMachine, clientNode);
      newNode.setLocalName(components[inodes.length-1]);
      writeLock();
      try {
        newNode = addChild(inodes, inodes.length-1, newNode, -1, false);
      } finally {
        writeUnlock();
      }
      if (newNode == null) {
        NameNode.stateChangeLog.info("DIR* FSDirectory.addFile: "
                                     +"failed to add "+path
                                     +" to the file system");
        return null;
      }
      // add create file record to log, record new generation stamp
      fsImage.getEditLog().logOpenFile(path, newNode);
  
      if (NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug("DIR* FSDirectory.addFile: "
                                      +path+" is added to the file system");
      }
      
      return newNode;
    }
docs: Add the given filename to the fs.