Borrar filtros
Borrar filtros

what is the difference between dir and ls

19 visualizaciones (últimos 30 días)
John
John el 4 de Mayo de 2016
Respondida: Adam el 4 de Mayo de 2016
Is there a difference between dir and ls?

Respuesta aceptada

Adam
Adam el 4 de Mayo de 2016
Using the syntax
list = ls(...)
vs
list = dir(...)
gives a very different result. The former just gives you a character array of the names, the latter gives you a struct which contains information about the date modified, byte size and whether or not the particular element of the listing is a folder.
When used without return type both just give a listing of folder/file names within the given folder and no further information.

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by