On Tue, 29 Jan 2013, John Rose wrote:
> Tobias,
> 
> Thanks for that useful reply.
> 
> I have a quick question (it doesn't seem worth asking on the Mailing List):
> Using Dialog.OpenFile(), the resulting Dialog.Path shows the full path 
> to the file (e.g. /home/john/x.txt). Given that the runtime user might 
> change to a different directory (from that specified in Dialog.Path - 
> /home/john/ - as a prior command to Dialog.OpenFile()) how can I obtain 
> the new directory (e.g. /home/john/abc/) easily? I thought of using a 
> string function to select characters before the final slash character 
> but then the filename might contain a slash....

Mmm. I hope I understood you correctly: you want to get the directory part
of a path? The File class has some useful static functions for path
manipulation.

The right one for this case could probably be File.Dir(). Try out if it fits
your needs. Especially your last sentence makes me wonder...

Regards,
Tobi

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to