original_string: protected function checkFile($writable = true)
      {
          if(!$this->fileExists()) throw NonExistentFileException::createForFileDoesNotExists($this->getFilePath());
          if(!is_readable($this->file_path)) throw NotReadableFileException::createForNotReadable($this->getFilePath());
          if($writable)
          {
              if(!is_writable($this->file_path)) throw NotWritableFileException::createForNotWritable($this->getFilePath());
          }
      }
code: protected function checkFile($writable = true)
      {
          if(!$this->fileExists()) throw NonExistentFileException::createForFileDoesNotExists($this->getFilePath());
          if(!is_readable($this->file_path)) throw NotReadableFileException::createForNotReadable($this->getFilePath());
          if($writable)
          {
              if(!is_writable($this->file_path)) throw NotWritableFileException::createForNotWritable($this->getFilePath());
          }
      }
code_tokens: protected function checkFile ( $ writable = true ) { if ( ! $ this -> fileExists ( ) ) throw NonExistentFileException :: createForFileDoesNotExists ( $ this -> getFilePath ( ) ) ; if ( ! is_readable ( $ this -> file_path ) ) throw NotReadableFileException :: createForNotReadable ( $ this -> getFilePath ( ) ) ; if ( $ writable ) { if ( ! is_writable ( $ this -> file_path ) ) throw NotWritableFileException :: createForNotWritable ( $ this -> getFilePath ( ) ) ; } }
docstring: Checks the file whether exists and is readable or writable
  @param bool $writable
  @throws AtomicFileException
docstring_tokens: Checks the file whether exists and is readable or writable