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.lockinfo - Function Up: os - Tool Previous: os.move - Function


os.remove - Function



Package utility
Module misc
Tool os


remove files, directories, or symlinks


Synopsis
remove(pathname, recursive, mustexist, follow)


Description
Remove one or more files, directories (optionally recursively), or symbolic links.
If the source is a directory, it will be by default be removed recursively. If recursive=F only the directory will be removed. In that case it results in an error if it is not empty.

By default a source symbolic link is followed. In that case not only the symbolic link is removed, but also the file or directory it links to.

By default an error is given if the target to be deleted does not exist. This can be prevented by giving mustexist=F.



Example
This command removes an entire MeasurementSet.
  dos.remove ('~/aips++/test/hol.ms');



Arguments

pathname in path names
    Allowed: vector of strings
recursive in remove directories recursively?
    Allowed: bool
    Default: T
mustexist in does the file need to exist?
    Allowed: bool
    Default: T
follow in follow symlink?
    Allowed: bool
    Default: T


Returns
T or fail




next up previous contents index
Next: os.lockinfo - Function Up: os - Tool Previous: os.move - 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