1. Enhanced dir() function

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

new topic     » topic index » view message » categorize

2. Re: Enhanced dir() function

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Enhanced dir() function

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu