summaryrefslogtreecommitdiffstats
path: root/combox/file.py
Commit message (Collapse)AuthorAgeFilesLines
* [bug fix] combox/file.py: rm_shards function checks if a shard exists before ↵Siddharth Ravikumar2015-01-271-1/+7
| | | | os.remove()ing it.
* combox/file.py: defined hash_file function.Siddharth Ravikumar2015-01-211-0/+13
| | | | | | hash_file function returns the SHA512 hash of the file's content. The test for the hash_file function is at tests/file_test.py
* updated copright year.Siddharth Ravikumar2015-01-201-1/+1
| | | | | | | | | | | | modified: combox/cbox.py modified: combox/config.py modified: combox/crypto.py modified: combox/events.py modified: combox/file.py modified: tests/config_test.py modified: tests/crypto_test.py modified: tests/events_test.py modified: tests/file_test.py
* [bug fix] combox/file.py: fixed bug in move_shards functionSiddharth Ravikumar2015-01-161-0/+5
| | | | | the fix: the shards don't have to be renamed when the directory under which they're located is renamed/moved.
* combox/file.py: wrote new utility functions.Siddharth Ravikumar2015-01-151-0/+99
| | | | | | | - rm_nodedir - move_nodedir - rm_shards - move_shards
* combox/file.py: new functions defined.Siddharth Ravikumar2015-01-141-6/+53
| | | | | | relative_path: returns relative path of directory or file w. r. t combox directory. mk_nodedir: creates a directory inside all node directories purge_dir: (1) purges a file or (2) purges everything inside a directory (except itself).
* combox/file.py: added mk_nodedir function.Siddharth Ravikumar2015-01-131-0/+13
|
* rewrote the read_shards() and write_shards() function in combox/file.py.Siddharth Ravikumar2015-01-131-12/+17
| | | | | | | | | Tests were accordingly modded and now use the test config.yaml to split and write shards to dirs. modified: combox/file.py modified: tests/crypto_test.py modified: tests/file_test.py
* added back combox/file.pySiddharth Ravikumar2015-01-121-0/+127
|
* consolidated everything into combox/combox.py.Siddharth Ravikumar2015-01-121-127/+0
| | | | | | | | | | | | tests were removed. will write tests using `nose` later. renamed: combox/file.py -> combox/combox.py deleted: combox/config.py deleted: combox/crypto.py renamed: tests/test_config.py -> tests/combox_tests.py deleted: tests/files/the-red-star.jpg deleted: tests/test_crypto.py deleted: tests/test_file.py
* file.py: wrote two new functions -- write_shards(), read_shards()Siddharth Ravikumar2014-11-051-0/+33
| | | | | modified: file.py modified: tests/test_file.py
* updated file.py: fixed typo in glue_data documentation.Siddharth Ravikumar2014-10-301-1/+1
|
* updated combox/file.py: renamed split_file -> split_data and glue_file -> ↵Siddharth Ravikumar2014-10-301-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | glue_data split_data: reads a string or a stream of bytes and splits them into `n' parts. glue_data: reads an array of strings / stream of bytes and glues them into one string / stream of bytes. read_file: reads content from file and returns it. --- "Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language." said Peter Norvig, director of search quality at Google, Inc. --- Google has employed a Gingrich-era Republican as its head lobbyist in DC. Now, Google is effectively helping Comcast kill the Internet as we know it, and end "Net Neutrality" forever. -- SumOfUs.org Sign a petition to ask Google to stand up for Net Neutrality: http://action.sumofus.org/a/googlesupportnn/
* renamed: utils/file.py -> file.py, tests/utils_file.py -> tests/test_file.pyrsiddharth2014-10-301-0/+84
utils/ directory deleted now.