On some systems, file paths can contain extensions, which indicate the type of information stored in the file. For example, on some systems, a path can start with a drive or volume letter, while this element is not present in other systems. The exact format of a path is determined by the current platform. A path does not necessarily point to a location on disk for example, a path might map to a location in memory or on a device. ' D:\Documents and Settings\cliffc\Local Settings\Temp\8\tmp3D.tmp is a file available for use.Ī path is a string that provides the location of a file or directory. ' D:\Documents and Settings\cliffc\Local Settings\Temp\8\ is the location for temporary files. ' The full path of temp is D:\Documents and Settings\cliffc\My Documents\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug\temp. ' The string temp contains no root information. ' This code produces output similar to the following: using namespace System Ĭonsole::WriteLine( " is a file available for use.", Path.GetTempFileName()) The following example demonstrates some of the main members of the Path class.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |