C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

System.IO.Path


Posted Date: 25 Aug 2008    Resource Type: Articles    Category: .NET Framework
Author: Happy CoderMember Level: Gold    
Rating: 1 out of 5Points: 10



Path is one of the most underused, but a very useful class in System.IO namespace. It is a static class that performs operations on string file or directory information. It has a bunch of static methods dealing with string paths.

A path is generally a string containing information of a file or directory,it can also be absolute or relative path. Absolute path specifies the physical full location, while a relative path specifies a partical location relating the current location

Though the Path class is in System.IO namespace, it has nothing to do with file or directory. It's members or operations has no effect on the file or directory, they purly deal with file names and paths

Methods of Path Class

ChangeExtension - Changes the extension of a path string.
Combine - Combines two path strings.
GetDirectoryName - Returns the directory information for the specified path string.
GetExtension - Returns the extension of the specified path string.
GetFileName - Returns the file name and extension of the specified path string.
GetFileNameWithoutExtension - Returns the file name of the specified path string without the extension.
GetFullPath - Returns the absolute path for the specified path string.
GetInvalidFileNameChars - Gets an array containing the characters that are not allowed in file names.
GetInvalidPathChars - Gets an array containing the characters that are not allowed in path names.
GetPathRoot - Gets the root directory information of the specified path.
GetRandomFileName - Returns a random folder name or file name.
GetTempFileName - Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.
GetTempPath - Returns the path of the current system's temporary folder.
HasExtension - Determines whether a path includes a file name extension.
IsPathRooted - Gets a value indicating whether the specified path string contains absolute or relative path information.

Happy Coding !!!



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
System.IO.Path  .  System.IO  .  Path  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Using Statement in C#
Previous Resource: Crystalreports
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use