Open

Description

Opens a file handle in one of 4 different modes described above.

Note

If a file is created, the file modification date is set to the current time from the built-in RTC (Real Time Clock). You can change the time by using the Time command. You can modify the file modification date using the Change Timestamp command.


Format

O fh mode path


Parameters

  • fh is a file handle (1 - 4). Use the Free Handle command to get a free file handle.
  • mode is one of:
    • R” – Open in read-only mode. No data can be written to the file.
      The filename in the path must exist.
    • W” – Open in write mode. This opens a new file for writing. The file must not already exist.
      The filename in the path must NOT already exist.
    • A” – Open in append mode. This opens a new or existing file for writing. Once opened, the file handle is positioned at the end of the file.
      If the filename in the path does not exist, it will be created.
    • RW” – Open in read/write mode. This opens a new or existing file for reading and/or writing. Once opened, the file handle is positioned at the beginning of the file.
      If the filename in the path does not exist, it will be created.
  • path is the absolute path to a file/directory. A properly formatted path must begin with a ”/” (forward slash) and begins at the root directory. Subdirectories are separated with ”/” (forward slash).
    • e.g. /logs/january/jan3.log

Response Format

NULL | Enn


Example

Open a file for reading:

O 1 R /LOGS/JANUARY/JAN03.LOG

Open a file for reading and writing:

O 1 RW /www/httpdocs/chatlog/chatlog002.log

  • Bookmark at
  • Bookmark "Open" at del.icio.us
  • Bookmark "Open" at Digg
  • Bookmark "Open" at Google
  • Bookmark "Open" at StumbleUpon
  • Bookmark "Open" at Technorati
  • Bookmark "Open" at Facebook
  • Bookmark "Open" at Twitter
  • Bookmark "Open" at Slashdot
  • Bookmark "Open" at Yahoo! Bookmarks
  • Bookmark "Open" at Furl
  • Bookmark "Open" at Reddit
  • Bookmark "Open" at Ask
  • Bookmark "Open" at BlinkList
  • Bookmark "Open" at blogmarks
  • Bookmark "Open" at Ma.gnolia
  • Bookmark "Open" at Netscape
  • Bookmark "Open" at ppnow
  • Bookmark "Open" at Rojo
  • Bookmark "Open" at Shadows
  • Bookmark "Open" at Simpy
  • Bookmark "Open" at Socializer
  • Bookmark "Open" at Spurl
  • Bookmark "Open" at Tailrank
  • Bookmark "Open" at Live Bookmarks
  • Bookmark "Open" at Wists
  • Bookmark "Open" at Yahoo! Myweb
  • Bookmark "Open" at BobrDobr
  • Bookmark "Open" at Memori
  • Bookmark "Open" at Faves
  • Bookmark "Open" at Favorites
  • Bookmark "Open" at Newsvine
  • Bookmark "Open" at myAOL
  • Bookmark "Open" at Fark
  • Bookmark "Open" at RawSugar
  • Bookmark "Open" at LinkaGoGo
  • Bookmark "Open" at Mister Wong
  • Bookmark "Open" at Wink
  • Bookmark "Open" at BackFlip
  • Bookmark "Open" at Diigo
  • Bookmark "Open" at Segnalo
  • Bookmark "Open" at Netvouz
  • Bookmark "Open" at DropJack
  • Bookmark "Open" at Feed Me Links
  • Bookmark "Open" at funP
  • Bookmark "Open" at HEMiDEMi
ummc/documentation/command/open.txt · Last modified: 2010/04/08 21:20 by bhagman
Valid CSS Recent changes RSS feed Valid XHTML 1.0