Eggdrop Documentation - 8. Filesys module
8. Filesys module
- setpwd <idx> <dir>
Description: changes the directory of a file system user, in exactly the same way as a 'cd' command would. The directory can be specified relative or absolute.
Returns: nothing
Module: filesys
- getpwd <idx>
Returns: the current directory of a file system user
Module: filesys
- getfiles <dir>
Returns: a list of files in the directory given; the directory is relative to dcc-path
Module: filesys
- getdirs <dir>
Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path
Module: filesys
- dccsend <filename> <ircnick>
Description: attempts to start a dcc file transfer to the given nick; the filename must be specified either by full pathname or in relation to the bot's startup directory
Returns:
0
success
1
the dcc table is full (too many connections)
2
can't open a socket for the transfer
3
the file doesn't exist
4
the file was queued for later transfer, which means that person has too many file transfers going right now
5
copy-to-tmp is enabled and the file already exists in the temp directory
Module: transfer
- filesend <idx> <filename> [ircnick]
Description: like dccsend, except it operates for a current filesystem user, and the filename is assumed to be a relative path from that user's current directory
Returns: 0 on failure; 1 on success (either an immediate send or a queued send)
Module: filesys
- fileresend <idx> <filename> [ircnick]
Description: functions like filesend, only that it sends a DCC RESEND instead of a DCC SEND, which allows people to resume aborted file transfers if their client supports that protocol. ircII/BitchX/etc. support it; mIRC does not.
Returns: 0 on failure; 1 on success (either an immediate send or a queued send)
Module: filesys
- setdesc <dir> <file> <desc>
Description: sets the description for a file in a file system directory; the directory is relative to dcc-path
Returns: nothing
Module: filesys
- getdesc <dir> <file>
Returns: the description for a file in the file system, if one exists
Module: filesys
- setowner <dir> <file> <handle>
Description: changes the owner for a file in the file system; the directory is relative to dcc-path
Returns: nothing
Module: filesys
- getowner <dir> <file>
Returns: the owner of a file in the file system
Module: filesys
- setlink <dir> <file> <link>
Description: creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path
Returns: nothing
Module: filesys
- getlink <dir> <file>
Returns: the link for a linked file, if it exists
Module: filesys
- getfileq <handle>
Returns: list of files queued by someone; each item in the list will be a sublist with two elements: nickname the file is being sent to and the filename
Module: transfer
- getfilesendtime <idx>
Returns: the unixtime value for when a file transfer started, or a negative number:
-1
no matching transfer with the specified idx was found
-2
the idx matches an entry which is not a file transfer
Module: transfer
- mkdir <directory> [<required-flags> [channel]]
Description: creates a directory in the file system. Only users with the required flags may access it.
Returns:
0
success
1
can't create directory
2
directory exists but is not a directory
-3
could not open filedb
Module: filesys
- rmdir <directory>
Description: removes a directory from the file system.
Returns: 0 on success; 1 on failure
Module: filesys
- mv <file> <destination>
Description: moves a file from its source to the given destination. The file can also be a mask, such as /incoming/*, provided the destination is a directory.
Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned:
-1
invalid source file
-2
invalid destination
-3
destination file exists
-4
no matches found
Module: filesys
- cp <file> <destination>
Description: copies a file from its source to the given destination. The file can also be a mask, such as /incoming/*, provided the destination is a directory.
Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned:
-1
invalid source file
-2
invalid destination
-3
destination file exists
-4
no matches found
Module: filesys
- getflags <dir>
Returns: the flags required to access a directory
Module: filesys
- setflags <dir> [<flags> [channel]]
Description: sets the flags required to access a directory
Returns: 0 on success; -1 or -3 on failure
Module: filesys