file related info
David Bovill
david at openpartnership.net
Mon May 5 11:19:47 EDT 2008
I have a few handlers - I am sure they could be improved. Here are a couple:
function file_GetSize filePath
> -- was "fileSize"
> return item 2 of file_DetailedInfo(filePath)
> end file_GetSize
>
> function file_LastModifed filePath
> -- version original,27/12/02
> return item 5 of file_DetailedInfo(filePath)
> end file_LastModifed
>
> function file_DetailedInfo filePath
> -- was "detailedFileInfo"
>
> if filePath is empty then return empty
> put filePath into someDirectory
> set the itemdelimiter to "/"
> put last item of filePath into shortFileName
> delete last item of someDirectory
> put the directory into oDirectory
> set the directory to someDirectory
> put the detailed files into detailedFileTable
set the directory to oDirectory
> put urlEncode(shortFileName) into encodedName
>
> filter detailedFileTable with (encodedName & ",*")
> return detailedFileTable
> end file_DetailedInfo
>
More information about the use-livecode
mailing list