File Manipulation Operations
IDL provides a variety of routines that allow you to retrieve information about and manipulate files and directories. See the following topics:
- Importing and Writing Data into Variables (Using IDL) describes various methods of accessing files
- "General File Access" (IDL Quick Reference) provides a complete list of routines that allow you to access, locate, modify, and get information about files
Working with UNIX Links
On UNIX platforms, you can create file links, both regular (hard) and symbolic. A hard link is a directory entry that references a file. UNIX allows multiple such links to exist simultaneously, meaning that a given file can be referenced by multiple names. The following limitations on hard links are enforced by the operating system:
- Hard links may not span file systems, as hard linking is only possible within a single file system.
- Hard links may not be created between directories, as doing so has the potential to create infinite circular loops within the hierarchical Unix file system. Such loops will confuse many system utilities, and can even cause file system damage.
A symbolic link is an indirect pointer to a file; its directory entry contains the name of the file to which it is linked. Symbolic links may span file systems and may refer to directories.
Use the FILE_LINK procedure to create hard and soft links on UNIX systems. See "FILE_LINK" (IDL Reference Guide) for details.
Use the FILE_READLINK procedure to retrieve the path to a file referenced by a UNIX symbolic link. See "FILE_READLINK" (IDL Reference Guide) for details.
Use the FILE_SAME function to determine whether two file names refer to the same underlying file. See "FILE_SAME" (IDL Reference Guide) for details.