file-info on directorys

Q&A's, tips, howto's

file-info on directorys

Postby HPW » Wed Apr 27, 2016 6:16 pm


Should file-info return the size of a Directory?
The doc is not clear.
And on windows it does not.

Code: Select all
(file-info "C:/Temp")

(0 16895 2 0 0 1457865730 1457865730 1309073923)

Posts: 1375
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: file-info on directorys

Postby Lutz » Sat Apr 30, 2016 6:40 pm

The file-info just reports the contents of the C stat() or fstat() function argument structure, without any processing.

There are subtle differences how structure fields are used on different platforms but this manual page for Linux perhaps gives you an Idea: . To figure out the size of a directory, you would have to write a function yourself, using file-info on all files in a directory.
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests