June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to retrieve a portion of a path or verify that a file path is in a normal (standardized) form.
Process the path using the System.IO.Path class.
File paths are often difficult to work with in code because there are an unlimited number of ways to represent the same directory. For example, you might use an absolute path (c:\temp), a UNC path (\\myserver\\myshare\temp), or one of many possible relative paths (c:\ temp\ myfiles\..\ or c:\temp\myfiles\..\..\temp). This is especially the case if you want the user to supply a file or path value. In this case, the user could specify a relative path that points to an operating system file. If your code doesn’t detect the problem, sensitive information ...
Read now
Unlock full access