1. Enhanced dir() function
- Posted by Larry Miller <larrymiller at sask?el?net> Apr 29, 2008
- 601 views
Currently the only attributes returned by this function are those supported by DOS. Windows file systems, especially NTFS, supports quite a few more. Would is be possible for the dir() function to return these as well? I understand that this could break some applications that tested for specific combinations of attributes. Larry Miller
2. Re: Enhanced dir() function
- Posted by Marco Achury <achury at ca?tv.n?t> Apr 29, 2008
- 605 views
- Last edited Apr 30, 2008
My main use for attributes is:
DirList = dir() for i=1 to length(DirList) do if find('d', DirList[i][D_ATTRIB]) then -- Do something end for end for
In this case adding extra attribs, don't break the code. Is the same if the string is "d" or "dhaxyz" Of course some people will use different things, like read each character of the string to set flags on-off, in this case they must to include in the code instructions to ignore unknow attribs. Linux users currently only get info about 'd' attrib, they would like to get a unix style chmod sequence like: "drwxr-x---" In this case the position of the char changes the sense. +-+-+-+-+-+-+-+ Marco A. Achury Caracas, Venezuela
3. Re: Enhanced dir() function
- Posted by Shawn Pringle <shawn.pringle at gmail.?o?> May 01, 2008
- 584 views
Marco Achury wrote: > > > Linux users currently only get info about 'd' attrib, > they would like to get a unix style chmod sequence like: > > "drwxr-x---" > > In this case the position of the char changes the sense. The character 'r' is documented as readonly in the dir() documentation. It would be trivial to give 'r' to the Linux community by testing if the current process has write access. It leads to cleaner looking code for dir() to provide the same interface regardless of platform. On the other hand, if you name your function to something new like folder_list(), then you can design any interface you like and you can set positional flags that are peclular to all the filesystems you will likely use: ext2, vfat, ntfs, and reiser. Shawn Pringle