File attribute functions?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

File attribute functions?

Post by AlexAdams » Wed Sep 16, 2009 7:54 pm

I'm building an application that will copy selected files from a local or network file system into an application controlled folder/file structure. I'll be creating data records that contain information about the file. The question is how to get that information?

sourcePath, sourceFileName, sourceFileSize, sourceFileExtension are fields that need populating. I can see parsing the path taken from an answer file dialog to get the name and extension, but are there functions available for this? And how to I get the file size and perhaps creation and last modified dates?

Thanks,
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Thu Sep 17, 2009 8:56 am

Hi Alex,

you are looking for "the long files"!
Check the docs (Revolution Dictionary) for "files".

"the long files" will give you all the info you need.


Best

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Sep 17, 2009 8:56 am

Dear AlexAdams,

You can get the file path, file name and extension from the file path returned by the answer file dialog. For creation and modification dates, you can use the detailed files function. Read the docs for more info.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply