Check path is a file

    0

    8

    Python public recipes

    This code checks to see if the file '/path/to/check' exists.

    Shortcut: file.isfile

    import os
    
    os.path.isfile('/path/to/check')
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.