Surprising result

Ken Ray kray at sonsothunder.com
Fri Jun 22 19:29:54 EDT 2007


On Fri, 22 Jun 2007 14:39:58 +0100, Mark Smith wrote:

> Currently, I have a library handler:
> 
> function getFileInfo pFileName

(snip)

Great minds think alike! There's a similar one on the Rev Standard 
Library at RevInterop:

  http://groups.yahoo.com/group/revInterop


----
stdFileInfo
Retrieves the file/folder information on a specific file/folder, either 
as a raw value or in a parseable array. 

If infoItem is empty, you will get back the line from the 'detailed 
files' in its entirety. 

If infoItem is one of "fileName", "dataSize", "resSize", "size" (a 
combination of "dataSize" and "resSize"), "createDate", "modDate", 
"accessDate","BUdate","ownerID", "groupID", "permissions","creator", 
"type", or "creatorType" (a combination of "creator" and "type"), only 
that value is returned. 

If infoItem is "array", you get back all the items in an array that you 
can then use one of the info "keys" above to get at the value you're 
interested in, with "full" giving you the full detailed files line.

Syntax:	stdFileInfo(filePath[,infoItem])
Example 1:	put stdFileInfo("/Users/Ken/test.txt")
Returns:	test.txt,144,0,1174438984,1174457008,1174467820,0,502,502,
644,TTXTtext
Example 2:	put stdFileInfo("/Users/Ken/test.txt","creatorType")
Returns:	TTXTtext
Example 3:	put stdFileInfo("/Users/Ken/test.txt","array") into tMyArrayA
put tMyArrayA["creatorType"]
Returns:	TTXTtext
----

:-)

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the use-livecode mailing list