Thanks to visit codestin.com
Credit goes to github.com

Skip to content

os.listdir inconsistent #249

@tannewt

Description

@tannewt

After an SD card is mounted, os.listdir returns different results depending on if the path name is given or implicit through the current working directory.

print(os.listdir(os.getcwd()))
print(os.listdir())

Produces:

[b'sd', 'boot_out.txt', '.fseventsd', 'adafruit_sdcard.mpy', 'code.py', '._code.py', 'adafruit_bus_device']
['boot_out.txt', '.fseventsd', 'adafruit_sdcard.mpy', 'code.py', '._code.py', 'adafruit_bus_device']

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions