I have a piece of code that functions perfectly on the Mac but with my license being used on my Powerbook and my iMac I am unable to test my stuff in Windows so I just need someone to confirm for me that this code will work on Windows, please…
Yes, the Resources directory needs to exist, that much is true. What I was referring to was the double backslash. I just need to know if this is going to work or wether this concatenation will require the pathname to be
or
I am aware of the use of special characters in strings but don’t just want to use untested code and say: “There you go. hope it works”. Since this and the following is the only code that makes use of the windows filesystem I just wanted to get confirmation from someone that the \ is correctly used in these two situations…
function ExtractFilename(filepath: String) : String
{
filepath = filepath.Trim();
if ( filepath.EndsWith("\\")
|| filepath.EndsWith("/" ) )
{
return String.Empty;
}
var position : int = filepath.LastIndexOf("\\"[0]);
if (position < 0)
position = filepath.LastIndexOf("/"[0]);
so apart from the Resources folder that neds to exist, you are saying the code is okay?