MCPcopy
hub / github.com/Gallopsled/pwntools / stat

Method stat

pwnlib/filesystem/ssh.py:412–423  ·  view source on GitHub ↗

Returns the permissions and other information about the file >>> f = SSHPath('filename', ssh=ssh_conn) >>> f.touch() >>> stat = f.stat() >>> stat.st_size 0 >>> '%o' % stat.st_mode # doctest: +ELLIPSIS '...664'

(self)

Source from the content-addressed store, hash-verified

410 raise ValueError("Could not normalize path: %r" % path)
411
412 def stat(self):
413 """Returns the permissions and other information about the file
414
415 >>> f = SSHPath('filename', ssh=ssh_conn)
416 >>> f.touch()
417 >>> stat = f.stat()
418 >>> stat.st_size
419 0
420 >>> '%o' % stat.st_mode # doctest: +ELLIPSIS
421 '...664'
422 """
423 return self.ssh.sftp.stat(self.path)
424
425 def owner(self):
426 raise NotImplementedError()

Callers 11

existsMethod · 0.95
is_dirMethod · 0.95
is_fileMethod · 0.95
pushFunction · 0.45
readFunction · 0.45
mkdirFunction · 0.45
existsFunction · 0.45
isdirFunction · 0.45
unlinkFunction · 0.45
__init__Method · 0.45
whichFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected