Skip to content

glob on windows local file system produces different results to glob.glob #389

@simonm3

Description

@simonm3

Is glob intended to produce same results as glob.glob? They seem to be different at least on windows local file system.

import fs
from glob import glob
local = fs.open_fs("")
glob("test"), [x.path for x in local.glob("test")]

(['test'], [])
#####################################

glob("test/*"), [x.path for x in local.glob("test/*")]
(['test\pilot'], ['/test/'])

#####################################
[x.path for x in local.glob("test/**")]
produces same results as glob("test/**", recursive=True) but takes over 6 seconds whereas native glob takes 3ms!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions