python html代码注入_Python fnmatch.html方法代码示例

# 需要导入模块: import fnmatch [as 别名]

# 或者: from fnmatch import html [as 别名]

def ftp_SIZE(self, path):

"""

File SIZE

The FTP command, SIZE OF FILE (SIZE), is used to obtain the transfer

size of a file from the server-FTP process. This is the exact number

of octets (8 bit bytes) that would be transmitted over the data

connection should that file be transmitted. This value will change

depending on the current STRUcture, MODE, and TYPE of the data

connection or of a data connection that would be created were one

created now. Thus, the result of the SIZE command is dependent on

the currently established STRU, MODE, and TYPE parameters.

The SIZE command returns how many octets would be transferred if the

file were to be transferred using the current transfer structure,

mode, and type. This command is normally used in conjunction with

the RESTART (REST) command when STORing a file to a remote server in

STREAM mode, to determine the restart point. The server-PI might

need to read the partially transferred file, do any appropriate

conversion, and count the number of octets that would be generated

when sending the file in order to correctly respond to this command.

Estimates of the file transfer size MUST NOT be returned; only

precise information is acceptable.

http://tools.ietf.org/html/rfc3659

"""

try:

newsegs = toSegments(self.workingDirectory, path)

except InvalidPath:

return defer.fail(FileNotFoundError(path))

def cbStat(result):

(size,) = result

return (FILE_STATUS, str(size))

return self.shell.stat(newsegs, ('size',)).addCallback(cbStat)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值