Advertisement



Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

New Member?



 
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 07-05-2008, 02:34 PM   #1 (permalink)
Zuner
 
CouchPotato99's Avatar
 
Join Date: May 2008
Posts: 75
Reputation: 53
Default [SOLVED] Find full path of Content.RootDirectory?


Still a novice programmer here, so any help is appreciated. I want a way to say "Do something for each directory in Content", where Content is the root directory for the content manager in my game. I found that one can do this with System.IO.Directory or System.IO.DirectoryInfo (I don't know the difference between them...) but to declare a Directory or DirectoryInfo you need to know the full path to the directory. Is there anyway I can find the full path to the root directory for the content manager? This will need to be done at runtime because the path will change on each computer. Is there a way to do this? Am I making this way to hard? Will my way not even work? Any help is greatly appreciated.







CouchPotato99 is offline   Reply With Quote
Old 07-05-2008, 03:16 PM   #2 (permalink)
Jr. Member
 
SimReality's Avatar
 
Join Date: May 2008
Posts: 410
Reputation: 60
Default

Should be able to get it by putting this in your game's constructor:

string fullContentPath = Path.Combine(StorageContainer.TitleLocation, Content.RootDirectory);



SimReality is offline   Reply With Quote
Old 07-05-2008, 03:27 PM   #3 (permalink)
Zuner
 
CouchPotato99's Avatar
 
Join Date: May 2008
Posts: 75
Reputation: 53
Default

Quote:
Originally Posted by SimReality View Post
Should be able to get it by putting this in your game's constructor:

string fullContentPath = Path.Combine(StorageContainer.TitleLocation, Content.RootDirectory);
Cool, that should work. Thanks for the help!




CouchPotato99 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 08:23 PM.

 
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8
vB Ad Management by =RedTyger=
(C) ZuneBoards 2006-2007
Copyright © 2006 - 2008 Zune Boards | About Zune Boards | Legal | A member of the Crowdgather Forum Community