def file_size(filename):
    # Using open/lseek works on both regular files and block devices
    fd = os.open(filename, os.O_RDONLY)
    try:
        return os.lseek(fd, 0, os.SEEK_END)
    except KeyboardInterrupt as e:
        raise e
    except Exception as e:
        raise Exception("file_size failed to obtain the size of '%s': %s" % (filename, str(e)))
    finally:
        os.close(fd)
Uninstall a Node.js package.
dataset/ETHPy150Open devttys0/binwalk/src/binwalk/core/common.py/file_size--crossover with--dataset/ETHPy150Open ronnix/fabtools/fabtools/nodejs.py/uninstall_package