Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetFile ¶
type NetFile struct { Cmd string // command associated with Pid Pid int // pid of the owner Src net.Addr // source address Dst net.Addr // destination address }
NetFile represents a network file.
func OpenNetFiles ¶
OpenNetFiles compiles a regular expression out of "s". Some manipulation may be performed on "s" before it is compiled, depending on the hosting operating system: on macOS for example, if "s" ends with ".app", it will be trated as the root path to an application, otherwise "s" will be compiled untouched. It then uses “lsof” (or its platform dependent equivalent) tool to find the list of open files, filtering out the list by taking only the lines that match against the regular expression built.
Click to show internal directories.
Click to hide internal directories.