Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 4.00 average. Display Modes
Old 01-15-2003, 10:28 AM   #1
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default iTCL Documentation

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 is offline   Reply With Quote
Old 01-15-2003, 12:24 PM   #2
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

---

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 is offline   Reply With Quote
Old 01-15-2003, 03:15 PM   #3
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

---

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 is offline   Reply With Quote
Old 01-15-2003, 06:38 PM   #4
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

---

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.
darkone is offline   Reply With Quote
Old 09-23-2003, 07:12 PM   #5
PaJa
Member
 
Join Date: Jul 2003
Posts: 53
Default ITCL commands documentation

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!
PaJa is offline   Reply With Quote
Old 09-24-2003, 06:30 AM   #6
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

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.
FTPServerTools is offline   Reply With Quote
Old 10-13-2003, 05:32 PM   #7
PaJa
Member
 
Join Date: Jul 2003
Posts: 53
Question iTCL vfs command...?

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
PaJa is offline   Reply With Quote
Old 01-18-2020, 04:45 PM   #8
Fleurpink
Junior Member
 
Join Date: Jan 2020
Posts: 4
Default

Quote:
Originally Posted by PaJa View Post
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
Fleurpink is offline   Reply With Quote
Reply

Tags
error, resolve, return, success, vfs

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:59 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)