Closes the current file pointer.
323754
public function close()
   {

      if ( ! \is_resource( $this->fp ) )
      {
         return;
      }

      \fclose( $this->fp );
      $this->fp = null;

      if ( $this->access == static::ACCESS_WRITE || $this->access == static::ACCESS_READWRITE )
      {

         if ( ! \is_null( $this->mode ) && '\\' !== DIRECTORY_SEPARATOR )
         {
            \chmod( $this->file, $this->mode );
         }

      }

   }
1142855
public void close() throws Exception {
        this.files.clear();
        this.files = new ArrayList<File>();
        this.iterator = this.files.iterator();
    }
357842
@Override
    public void close() {
        if (!closed.getAndSet(true)) {
            if (fc != null) {
                try {
                    fc.close();
                    fc = null;
                } catch (final IOException e) {
                    // Ignore
                }
            }
            if (raf != null) {
                try {
                    raf.close();
                    raf = null;
                } catch (final IOException e) {
                    // Ignore
                }
            }
            if (chunkIdxToByteBuffer != null) {
                chunkIdxToByteBuffer.clear();
                chunkIdxToByteBuffer = null;
            }
            if (mappedByteBuffersCached != null) {
                for (int i = 0; i < mappedByteBuffersCached.length; i++) {
                    if (mappedByteBuffersCached[i] != null) {
                        FileUtils.closeDirectByteBuffer(mappedByteBuffersCached[i], /* log = */ null);
                        mappedByteBuffersCached[i] = null;
                    }
                }
                mappedByteBuffersCached = null;
            }
            nestedJarHandler = null;
        }
    }
1223436
def close(self):
        
        files = self.__dict__.get('files')
        for key, value in iter_multi_items(files or ()):
            value.close()
794165
public void close() {
    fsRunning = false;
    try {
      if (pendingReplications != null) {
        pendingReplications.stop();
      }
      if (hbthread != null) {
        hbthread.interrupt();
      }      
      if (underreplthread != null) {
        underreplthread.interrupt();
      }
      if (overreplthread != null) {
        overreplthread.interrupt();
      }
      if (raidEncodingTaskThread != null) {
        raidEncodingTaskThread.interrupt();
      }
      if (dnthread != null) {
        dnthread.interrupt();
      }
      if (automaticEditsRollingThread != null) {
        automaticEditsRoller.stop();
        // We cannot interrupt roller thread. For manual failover, we want
        // the edits file operations to finish.
        automaticEditsRollingThread.join();
      }
      if (safeMode != null) {
        safeMode.shutdown();
      }
    } catch (Exception e) {
      LOG.warn("Exception shutting down FSNamesystem", e);
    } finally {
      // using finally to ensure we also wait for lease daemon
      try {
        LOG.info("Stopping LeaseManager");
        stopLeaseMonitor();
        if (InjectionHandler
            .trueCondition(InjectionEvent.FSNAMESYSTEM_CLOSE_DIRECTORY)) {
          if (dir != null) {
            LOG.info("Stopping directory (fsimage, fsedits)");
            dir.close();
          }
        }
      } catch (InterruptedException ie) {
      } catch (IOException ie) {
        LOG.error("Error closing FSDirectory", ie);
        IOUtils.cleanup(LOG, dir);
      }
    }
  }
133630
def close(self):
    """"""
    self._report_file.close()
    # Make sure everything's closed.
    for files in self._output_files.values():
      for f in files.values():
        f.close()
1323576
def _close(self):
        '''
        
        '''
        if hasattr(self, 'aiohttp'):
            if not self.aiohttp.closed:
                self.aiohttp.close()
        if hasattr(self, 'file_descriptors'):
            for fd in self.file_descriptors.values():
                if not fd.closed:
                    fd.close()
554263
public void close() throws IOException {
        clear();
        if (_tempfile != null) {
            _tempfile.close();
            _tempfile = null;
            _tempfilef.delete();
            _tempfilef = null;
        }
    }
692188
public synchronized void close() throws IOException {
    writable = false;
    if (map != null) {
      ByteArrayUtil.unmapByteBuffer(map);
      map = null;
    }
    if (lock != null) {
      lock.release();
      lock = null;
    }
    file.close();
  }
723694
@Override
  public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
31703
def close(self):
        """"""
        try:
            self.parent_fd.fileno()
        except io.UnsupportedOperation:
            logger.debug("Not closing parent_fd - reusing existing")
        else:
            self.parent_fd.close()
993548
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None

    self._decoder = None
    self._decoded_data = b''
    self._encoded_data = b''
915043
def _Close(self):
    """"""
    # pylint: disable=protected-access
    super(RawFile, self)._Close()

    for file_object in self._file_objects:
      file_object.close()

    self._file_objects = []
1161850
public void close() {
        logger.debug("Try to close accessFile and channel for file: " + osFile);
        if (headerBuffer != null) {
            headerBuffer.force();
            headerBuffer = null;
        }

        try {
            unlock();
            if (channel != null && channel.isOpen()) {
                channel.close();
                channel = null;
            }

            if (accessFile != null) {
                accessFile.close();
                accessFile = null;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        logger.debug("Closed accessFile and channel for file: " + osFile);
    }
1374457
public void close() throws IOException {
        if (fInputStream != null) {
            fInputStream.close();
            fInputStream = null;
            fData = null;
        }
    }
413592
def close_all_files(self):
        """"""
        while len(self.open_file_infos) > 0:
            file_info = self.open_file_infos.pop(0)
            file_info.file_handle.close()
            file_info.file_handle = None
            self.closed_file_infos.append(file_info)
        self.can_open_more_files = True
356424
def _Close(self):
    
    self._zip_file.close()
    self._zip_file = None

    self._file_object.close()
    self._file_object = None