Returns true if this object points to a file or to a symbolic link to a
file. Returns false if the object points to something which isn't a file,
such as a directory.

@return boolean
433502
public function isFile(): bool
    {
        if ($this->caching == false) {
            return is_file($this->getAbsoluteFilePath());
        }

        if ($this->isFile == null) {
            $this->isFile = is_file($this->getAbsoluteFilePath());
        }

        return $this->isFile;
    }
545840
public function has($file)
    {
        $file = "/".ltrim($file,"/");
        foreach($this->nodes as $node) {
            $mount = $node->getMountPoint();
            if (strncmp($mount, $file, strlen($mount)) === 0) {
                $nodefile = substr($file, strlen($mount));
                if ($node->has($nodefile)) {
                    return true;
                }
            }
        }
        return false;
    }
983152
def is_directory (self):
        
        filename = self.get_os_filename()
        return os.path.isdir(filename) and not os.path.islink(filename)
538726
private function isAlreadyInstalled() : bool
    {
        $public = new SplFileInfo(self::PROJECT_ROOT  . '/public');
        $src = new SplFileInfo(self::PROJECT_ROOT  . '/src');

        return $public->isDir() && $src->isDir();
    }
1145560
public function isFileEmpty()
    {
        $this->openFile();
        $saved_pointer = $this->getFilePointer();
        $this->rewindFile()->seekFileToEnd();
        $size_pointer = $this->getFilePointer();
        $this->seekFile($saved_pointer);

        return $size_pointer === 0;
    }
1311913
public function hasValidSourceFile()
    {
        $sourcefile = $this->getSourceFile();

        return (true === is_readable($sourcefile) && false === is_dir($sourcefile));
    }
623844
public function isFilePath()
    {
        if (is_string($this->data)) {
            try {
                return is_file($this->data);
            } catch (\Exception $e) {
                return false;
            }
        }

        return false;
    }
518192
public static function isLink(string $file = ''): bool
    {
        $file = static::normalizePath($file);
        return static::exists($file) && \is_link($file);
    }
1016454
public static function isAbsolutePath($path) : bool
    {
        /*
         * This is definitive if true but fails if $path does not exist or contains
         * a symbolic link.
         */
        if (realpath($path) == $path) {
            return true;
        }

        if (strlen($path) == 0 || $path[0] == '.') {
            return false;
        }

        // Windows allows absolute paths like this.
        if (preg_match('#^[a-zA-Z]:\\\\#', $path)) {
            return true;
        }

        // A path starting with / or \ is absolute; anything else is relative.
        return ( $path[0] == '/' || $path[0] == '\\' );
    }
486220
public function traverse()
    {
        // If the recursive flag is passed, traverse recursively.
        if ($this->recursive) {
            $objects = new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator($this->path), \RecursiveIteratorIterator::SELF_FIRST
            );
            foreach ($objects as $fileInfo) {
                if (($fileInfo->getFilename() != '.') && ($fileInfo->getFilename() != '..')) {
                    $this->objects[] = $fileInfo;
                    // If absolute path flag was passed, store the absolute path.
                    if ($this->absolute) {
                        $f = null;
                        if (!$this->filesOnly) {
                            $f = ($fileInfo->isDir()) ? (realpath($fileInfo->getPathname())) : realpath($fileInfo->getPathname());
                        } else if (!$fileInfo->isDir()) {
                            $f = realpath($fileInfo->getPathname());
                        }
                        if (($f !== false) && (null !== $f)) {
                            $this->files[] = $f;
                        }
                    // If relative path flag was passed, store the relative path.
                    } else if ($this->relative) {
                        $f = null;
                        if (!$this->filesOnly) {
                            $f = ($fileInfo->isDir()) ? (realpath($fileInfo->getPathname())) : realpath($fileInfo->getPathname());
                        } else if (!$fileInfo->isDir()) {
                            $f = realpath($fileInfo->getPathname());
                        }
                        if (($f !== false) && (null !== $f)) {
                            $this->files[] = substr($f, (strlen(realpath($this->path)) + 1));
                        }
                    // Else, store only the directory or file name.
                    } else {
                        if (!$this->filesOnly) {
                            $this->files[] = ($fileInfo->isDir()) ? ($fileInfo->getFilename()) : $fileInfo->getFilename();
                        } else if (!$fileInfo->isDir()) {
                            $this->files[] = $fileInfo->getFilename();
                        }
                    }
                }
            }
            // Else, only traverse the single directory that was passed.
        } else {
            foreach (new \DirectoryIterator($this->path) as $fileInfo) {
                if(!$fileInfo->isDot()) {
                    $this->objects[] = $fileInfo;
                    // If absolute path flag was passed, store the absolute path.
                    if ($this->absolute) {
                        $f = null;
                        if (!$this->filesOnly) {
                            $f = ($fileInfo->isDir()) ?
                                ($this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename() . DIRECTORY_SEPARATOR) :
                                ($this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename());
                        } else if (!$fileInfo->isDir()) {
                            $f = $this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
                        }
                        if (($f !== false) && (null !== $f)) {
                            $this->files[] = $f;
                        }
                    // If relative path flag was passed, store the relative path.
                    } else if ($this->relative) {
                        $f = null;
                        if (!$this->filesOnly) {
                            $f = ($fileInfo->isDir()) ?
                                ($this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename() . DIRECTORY_SEPARATOR) :
                                ($this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename());
                        } else if (!$fileInfo->isDir()) {
                            $f = $this->path . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
                        }
                        if (($f !== false) && (null !== $f)) {
                            $this->files[] = substr($f, (strlen(realpath($this->path)) + 1));
                        }
                    // Else, store only the directory or file name.
                    } else {
                        if (!$this->filesOnly) {
                            $this->files[] = ($fileInfo->isDir()) ? ($fileInfo->getFilename()) : $fileInfo->getFilename();
                        } else if (!$fileInfo->isDir()) {
                            $this->files[] = $fileInfo->getFilename();
                        }
                    }
                }
            }
        }
    }
401948
private function isPathWritable(): bool
    {
        if (! file_exists($this->path)) {
            return is_writable(dirname($this->path));
        }

        return is_writable($this->path);
    }
356917
public function isLinkLocal(): bool
    {
        if ($this->is_link_local === null) {
            $this->is_link_local = $this->isIn(static::$link_local_block);
        }

        return $this->is_link_local;
    }
896330
public function isDirectory(): bool {
		if ($this->isRoot()) {
			return true;
		}

		$content = $this->manager->listContents(
			$this->getParent()->getUrl(),
			false
		);

		return count(
				array_filter(
					$content,
					function ($item) {
						if ($item["basename"] == $this->getName()) {
							return $item["type"] == "dir";
						}

						return false;
					}
				)
			) === 1;
	}
730469
public function setPointerPositionToEndOfFile() : bool
   {

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

      return (bool) \fseek( $this->fp, 0, \SEEK_END );

   }
1044066
public function fileExists()
    {
        $this->filenameIsValide($this->name);

        return file_exists($this->getPath()) || is_dir($this->base_dir."/".$this->name);
    }
1190933
public function remove() : bool
    {
        $private = self::PRIVATE_ABSOLUTE_PATH . $this->destination . $this->privateFileName;
        $public = self::PUBLIC_ABSOLUTE_PATH . $this->destination;

        if (file_exists($private) || file_exists($public))
        {
            FileSystem::delete($private);
            FileSystem::delete($public);

            return TRUE;
        }

        return FALSE;
    }
675532
public function isExecutable()
    {
        clearstatcache();
        $fs = FileSystem::getFileSystem();
        if ($fs->checkAccess($this) !== true) {
            throw new IOException("No read access to " . $this->path);
        }

        return @is_executable($this->path);
    }