cli.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:ampy 作者: adafruit 项目源码 文件源码
def ls(directory):
    """List contents of a directory on the board.

    Can pass an optional argument which is the path to the directory.  The
    default is to list the contents of the root, /, path.

    For example to list the contents of the root run:

      ampy --port /board/serial/port ls

    Or to list the contents of the /foo/bar directory on the board run:

      ampy --port /board/serial/port ls /foo/bar
    """
    # List each file/directory on a separate line.
    board_files = files.Files(_board)
    for f in board_files.ls(directory):
        print(f)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号