A single point represents the current working directory. The double dot represents the current parent directory of the working directory.
None of them represents a specific βfileβ in the underlying file system, but represents the location of the directory in the file system hierarchy. Although you have not mentioned this, the symbol "/" in itself is similar to the fact that it usually represents the root of a particular file system. i.e
cd /
will bring you to the root of the current file system.
Rather, '.' and ".." are links to available resources in the file system and, as such, are pseudo files or pseudo-links generated by a request for file information in the base file system and are included to aid in navigating around the file system. They are usually OS independent, i.e. most OS systems respect their use.
You say that you are "writing a program." Many file management routines that retrieve directory lists include a switch or a method that ignores these pseudo files when creating directory lists.
However, as a rule, it is easiest to write your own program to iterate over entries and ignore these entries in directories if you do not need them. Alternatively, write your program only for a list of files or even files of a particular type that you are looking for. For example, use commands such as DOS on Windows by running
dir /a:-d
will only show files in the directory, but not '.' and "..". while
dir *.txt
will list only .txt files in the directory.
Tonyd source share