Skip to main content

File System Scan

Project description

fsdir:2012-03-26:v0.7:Test with Python2.6 and Python2.7


This is a simple, but handy module written in C, this module do a recursive walk returning file and folder information for Linux systems.
The module is in source form and was tested with python2.6 and python2.7.

To install the module after download execute.

#python install

Summary mode now match the "du" speed :)

The version 0.7
- Add crc32 hash, so we can check for duplicated files :)
- Bug hunting
- Better error handling
- Disable the id to string for the username too "expensive".
- Symlinks, FIFO, Socket are ignored.

PS:This module calculate the size in disk not the size of the file.

Summary off.
>>>import fsdir
[{'permGroup': 'rwx', 'permOwner': 'rwx', 'permOthers': 'rwx', 'Owner': 'rgomes', 'Path': '.', 'Type': 'D', 'Size': 0},#Dir dont return a CRC hash
{'permGroup': 'rwx', 'permOwner': 'rwx', 'permOthers': 'rwx', 'Owner': 'rgomes', 'Path': './', 'CRC32': 1086464254, 'Type': 'F', 'Size': 28}]

Summary On.
>>>import fsdir
>>>fsdir.go(".",True) #or fsdir.go(".") summary mode is On by default,
[{'Dirs': 1, 'Files': 2, 'Size': 28}]

Note: Permission always return 3 char string.
"rwx" If the premession is active or - if is not:
Example a file just with read permission will be "r--"

list[x]["permGroup"]=Permission to the Group
list[x]["permOwner"]=Permission to the Owner
list[x]["permOthers"]=Permission to the Others
list[x]["CRC32"]=CRC32 hash
list[x]["Owner"]=numeric id
list[x]["Path"]=Path to the file/dir
list[x]["Type"]=F|D (F=File, D=Directory)
list[x]["Size"]=Size in Kilobytes

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fsdir, version 0.7
Filename, size File type Python version Upload date Hashes
Filename, size fsdir-0.7.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page