tags:

views:

68

answers:

1

I want to get the extension of a file path in Flex. In C# I would just use Path.GetExtension() to do this.

Is there an equivalent in Flex, or do I have to write my own?

A: 

Are you using a Flex app running in AIR? If yes, you can:

            var file:File = new File("c:\\myfile.bat");
            trace(file.extension);
Cornel Creanga
Thanks. Unfortunately, I'm not using AIR. :(
Fiona Holder
In this case not...I suppose you are using FileReference for upload/download, and they have the extension property only for AIR.
Cornel Creanga