MCPcopy Index your code
hub / github.com/secdev/scapy / _lfs_complete

Method _lfs_complete

scapy/layers/smbclient.py:1483–1494  ·  view source on GitHub ↗

Return a listing of local files for completion purposes

(self, arg, cond)

Source from the content-addressed store, hash-verified

1481 return self._dir_complete(folder)
1482
1483 def _lfs_complete(self, arg, cond):
1484 """
1485 Return a listing of local files for completion purposes
1486 """
1487 eltpar, eltname = self._parsepath(arg, remote=False)
1488 eltpar = self.localpwd / eltpar
1489 return [
1490 # trickery so that ../<TAB> works
1491 str(eltpar / x.name)
1492 for x in eltpar.resolve().glob("*")
1493 if (x.name.lower().startswith(eltname.lower()) and cond(x))
1494 ]
1495
1496 @CLIUtil.addoutput(cd)
1497 def cd_output(self, result):

Callers 2

lcd_completeMethod · 0.95
put_completeMethod · 0.95

Calls 2

_parsepathMethod · 0.95
resolveMethod · 0.45

Tested by

no test coverage detected