RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Directory & File Path Functions

Kamron

Knight
Updated it with support for DirectoryInfo & FileInfo. Also EnsureDirectory will now accept file paths in strings and still work properly. Also removed the uncessary Directory.Exists, as this is done internally by the CreateDirectory method.
 

Jeff

Lord
GetFiles, should returm FileInfo[]. You can access attributes of the files better this way. FileInfo.Extension and such. You should also have it do bool recursive.
 

Kamron

Knight
I added a bool for recursing.
I added FileInfo[] returning for GetFiles. When you want to return a FileInfo[], you will need to use a DirectoryInfo or FileInfo path. You can easily do new DirectoryInfo( stringPath ) or new FileInfo( stringPath ) if you have a string based path.
TrimPaths now returns FileInfo[] as well as string[]
 
Top