Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: os.isvalidpathname - Function Up: misc - Module Previous: misc.tovector - Function


os - Tool



Package utility
Module misc


Postscript file available

Functions to perform system-specific operations

include "os.g"

Constructors
Functions
basename get file part in path names
copy copy a file, directory, or symlink
dir return a vector of strings with directory listing
dirname get directory part in path names
done end the os tool
edit edit a file
fileexists test if files exists
filetime return the file time
filetimestring return the file time string
filetype determine file type
freespace determine freespace on file systems
fullname expand path names
isvalidpathname test if path names are valid
lockinfo get info about table use and locking
ls directory listing
mail mail a message to a user
mkdir create directories
move move a file, directory, or symlink
remove remove files, directories, or symlinks
showtableuse tell if a table is used or locked
size determine file or directory sizes
type Return the type of this tool



Description
The os tool is used to perform system-specific operations, in particular operations on files -- for example:
  • testing if a file exists
  • getting a directory listing
  • getting the size of file(s)
  • getting the free space on a device
  • dealing with path names
  • copying, moving, or removing a file or directory
Most functions have a switch telling if a symbolic link has to be followed.
When a path name is given, it can contain environment variables (e.g. $HOME) and/or tildes (e.g. $ \sim$ or $ \sim$user).

Note that glish has some built-in functions to do file IO. It also has the stat function to obtain file information. However, those functions do not handle environment variables and tilde expansion.



Example
  include 'os.g'
  dos.fileexists ('~/file.name');
  dos.freespace ('.');




next up previous contents index
Next: os.isvalidpathname - Function Up: misc - Module Previous: misc.tovector - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15