| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This method now returns relative paths w. r. t all node directories. Before it used to return relative paths only w. r. t the first node directory.
Also updated the tests for it :~(
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
| |
shards/directories in node directories.
modified: combox/file.py
modified: tests/file_test.py
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It has a third argument (boolean) which tells whether `cb_path' (the
first argument) is a file or not.
Updated the test for node_path function + code wherever node_path was used.
modified: combox/events.py
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
| |
instead of using `path.isfile' to check if the path is a shard file or
not, it is checked if the path endswidth 'shard.N' where `N' is a
number.
|
|
|
|
|
|
|
|
| |
rm_path deletes a file or an empty directory.
updated the test for it too.
modified: tests/file_test.py
|
| |
|
| |
|
|
|
|
|
|
|
| |
wrote test for it too.
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
| |
also wrote test for it.
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
|
|
|
| |
- `file_content' is set to None by default
- If `file_content' is not None, hash of this is returned.
Updated the test for hash_file function.
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function takes the path to the file in the combox and returns the
path of its first shard in the node directory. If the the given
argument is a directory (inside the combox directory), the function
returns the corresponding path of the directory under the first node
directory.
Test for the function was also written.
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
|
|
|
|
| |
directory.
It returns the path of the respective file or directory in the combox directory.
Also updated the test for this function at tests.file_test.TestFile.test_cbpath
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
|
|
|
| |
This function, given the path of a file shard, returns the
corresponding path of the file in the combox directory.
The test for this function is at tests.file_test.TestFile.test_cbpath
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
|
|
|
|
|
|
| |
Now the function is rigged up to return path relative to both combox
directory and node directory.
Corresponding test for this function is at tests.file_test module.
modified: combox/file.py
modified: tests/file_test.py
|
|
|
|
| |
os.remove()ing it.
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
the fix: the shards don't have to be renamed when the directory under
which they're located is renamed/moved.
|
|
|
|
|
|
|
| |
- rm_nodedir
- move_nodedir
- rm_shards
- move_shards
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
modified: file.py
modified: tests/test_file.py
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
|
utils/ directory deleted now.
|