ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | >> Directory << | System | Time | Locale | CPUTime | Random

Module: Directory
Function: renameDirectory
Type: FilePath -> FilePath -> IO ()
Description: renameDirectory old new changes the name of an existing directory from old to new. If the new directory already exists, it is atomically replaced by the old directory. If the new directory is neither the old directory nor an alias of the old directory, it is removed as if by removeDirectory. A conformant implementation need not support renaming directories in all situations (for instance, renaming to an existing directory, or across different physical devices), but the constraints must be documented.
Related:

Example 1
Program source: 

import Directory

main = do createDirectory "/tmp/BAR"
	  a <- doesDirectoryExist "/tmp/BAR"
	  renameDirectory "/tmp/BAR" "/tmp/FOO"
	  b <- doesDirectoryExist "/tmp/BAR"
	  c <- doesDirectoryExist "/tmp/FOO"
	  print (a,b,c)

Output: (True,False,True)




_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
UNLIMITED Web Hosting by HostDepartment Alojamiento Web UK Domain Names glossary for conference call answering service
MSN VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE