@Override
	public List<GFile> getListing(GFile directory) throws IOException {
		if (directory == null) {
			directory = rootGFile;
		}
		if (!directory.isDirectory()) {
			return List.of();
		}
		File localDir = getFileFromGFile(directory);
		if (FSUtilities.isSymlink(localDir)) {
			return List.of();
		}

		File[] localFiles = localDir.listFiles();

		if (localFiles == null) {
			return List.of();
		}

		List<GFile> tmp = new ArrayList<>(localFiles.length);
		FSRL dirFSRL = directory.getFSRL();
		String relPath = directory.getPath(); // this is the clean relative path assigned to the dir GFile earlier

		for (File f : localFiles) {
			boolean isSymlink = FSUtilities.isSymlink(f); // check this manually to allow broken symlinks to appear in listing
			if (!(isSymlink || f.isFile() || f.isDirectory())) {
				// skip non-file things
				continue;
			}
			// construct a GFile with split personality... a relative GFile pathname but
			// an absolute FSRL path
			String name = f.getName();
			GFileLocal gf = new GFileLocal(f, FSUtilities.appendPath(relPath, name),
				dirFSRL.appendPath(name), this, directory);
			tmp.add(gf);
		}
		return tmp;
	}
A {@link GFileSystem} interface to a part of the user's local / native file system.
<p>
This class is a sub-view of the {@link LocalFileSystem}, and returns hybrid GFile objects
that have fully specified FSRL paths that are valid in the Root filesystem, but relative
GFile paths.
<p>
This class's name doesn't end with "FileSystem" to ensure it will not be auto-discovered
by the FileSystemFactoryMgr.
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/LocalFileSystemSub.java