PDA

View Full Version : iTCL Documentation


darkone
01-15-2003, 10:28 AM
Briefly:

1. New Internal commands (getting rid off !commands for itcl)
2. Multiple interpreters (pool)
3. 'puts' for stdout changed to 'iputs'




New commands:


resolve pwd <pwd>

Return: Path on success, "" on error

---

resolve uid <Uid>

Return: UserName on success, "" on error

---

resolve gid <Gid>

Return: GroupName on success, "" on error

---

resolve group <Group>

Return: Gid on success, -1 on error

---

resolve user <User>

Return: Uid on success, -1 on error

---

vfs read <directory/file>

Return: "Uid Gid Mode" on success and "" on error

---

vfs write <directory/file> <Uid> <Gid> <Mode>

Return: 0 on success and 1 on error

---

vfs delete <directory/file>

Return always 0

--

config read <array> <variable>

Return: Value on success and "" on error

--

config reload

--

config save

--

darkone
01-15-2003, 12:24 PM
---

iputs [-nonewline] [-noprefix] [-nobuffer] <String>

Return: Returns always ""

---

buffer get

Return: Returns current output buffer

---

buffer set <value>

Return: 0 on success and 1 on error

---

buffer flush <timeout>

Return: 0 on success

---

darkone
01-15-2003, 03:15 PM
---

resource +lock <lockname>

Return: Always "", errors are fatal

---

resource -unlock <lockname>

Return: Always "", errors are fatal

---


Locking allows multiple threads to access same resource (file/environmental variable) with thread safe means.

-- Example use --

filereader.itcl:

resource +lock $filename
set data [gets $fchannel]
resource -unlock $filename

filewriter.itcl:

resource +lock $filename
puts $fchannel $data
resource -unlock $filename

darkone
01-15-2003, 06:38 PM
---

resource +share channel <shareName> <channelName>

Return: "" on success, error is fatal

---

resource -unshare channel <shareName>

Return: ChannelName on success, error is fatal

---


Use this with locks, to create persistent connections, like:


iputs -nobuffer "Locking and Sharing juliet"

resource +lock "juliet"

if { [catch { set juliet [resource -unshare channel "juliet www server"] }] != 0 }

iputs -nobuffer "Creating juliet"

set juliet [socket www.inet.fi 80]

} else {
iputs -nobuffer "Juliet read from share"
}

iputs -nobuffer "Sharing juliet: $juliet"

resource +share channel "juliet www server" $juliet

resource -unlock "juliet"

iputs -nobuffer "Juliet successfully processed"


*Note* After sharing channel, interpreter does not have control anymore - read/write/etc will return with fatal error.

PaJa
09-23-2003, 07:12 PM
D1 please where i can find complete ITCL special commands list and documentation?

It's realy hard to find any info about :(
Please find some time to write a few lines.

Thx!

FTPServerTools
09-24-2003, 06:30 AM
Great darkone!

And Paja the docs are in the ioftpd help dir. And in the forum. And for tcl goto www.scriptics.com and check the tcl manuals in there.

PaJa
10-13-2003, 05:32 PM
Please d1 what are all commands of iTCL vfs?

I found:

vfs read <directory/file> <path>
vfs delete <directory/file> <path>
vfs write <directory/file> <path> <Uid> <Gid> <Mode>
vfs chattr <directory/file> <path> <1/??> <vlink>


But i don't know what are the other options if there are any.
Please let me know how to use it.
and plese is the some way how to unlock currently uploaded file or determine who is uploading this file and then kick him out?
Thanx!

PaJa

Fleurpink
01-18-2020, 04:45 PM
D1 please where i can find complete ITCL special commands list and documentation?

It's realy hard to find any info about :(
Please find some time to write a few lines.

Thx!

please where i can find complete ITCL special commands list and documentation i search for it all google