Main Content

dir

List directory contents on SoC board

    Description

    result = dir(p) lists the directory contents of the home directory of the SoC board connected.

    example

    result = dir(p,path) lists the directory contents of the specified path on the SoC board connected.

    Examples

    collapse all

    List directory contents of a folder on a specified SoC board.

    Create a Xilinx® processor hardware object and connect to the processor on-board the Xilinx SoC board.​

    p = xilinxsoc('192.168.1.101', 'root', 'root');

    Use the dir function to list the directory contents of the Documents folder located in your home directory.

    result = dir(p, 'Documents')
    result = 
    
      1×3 struct array with fields:
    
        name
        folder
        isdir
        bytes
    

    Input Arguments

    collapse all

    Hardware processor object that represents the connection from MATLAB® to the processor on a specific SoC hardware board, specified as a xilinxsoc object or intelsoc object.

    Path and name of file on the SoC board that you want the directory content listed for. You can use either the absolute path or the relative path from the home directory.

    If no path is specified, your home directory is used.

    Example: "/home/user/Documents"

    Example: "Documents"

    Output Arguments

    collapse all

    Returns information on contents of directory specified. If no directory is specified by using the input path, the home directory contents are listed.

    Version History

    Introduced in R2022a

    See Also

    Objects

    Functions