Skip to content

Commit

Permalink
I am no good at textile
Browse files Browse the repository at this point in the history
  • Loading branch information
David Snyder committed Jan 12, 2012
1 parent f7dcc8f commit 51d4d36
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.textile
Expand Up @@ -60,20 +60,18 @@ h3. FileSystem
* @ls_r@
* @mkdir_p@

** Note: Since S3 is just a key-value store, it is difficult to preserve the notion of a directory.
Therefore the @mkdir_p@ function has no purpose, as there cannot be empty directories. @mkdir_p@ currently only ensures that the bucket exists.
This implies that the @directory?@ test only succeeds if the directory is non-empty, which clashes with the notion on the UNIX filesystem.
Note: Since S3 is just a key-value store, it is difficult to preserve the notion of a directory. Therefore the @mkdir_p@ function has no purpose, as there cannot be empty directories. @mkdir_p@ currently only ensures that the bucket exists. This implies that the @directory?@ test only succeeds if the directory is non-empty, which clashes with the notion on the UNIX filesystem.

* Additionally, the S3 and HDFS abstractions implement functions for moving files to and from the local filesystem:
Additionally, the S3 and HDFS abstractions implement functions for moving files to and from the local filesystem:

* @copy_to_local@
* @copy_from_local@

** Note: For these methods the destination and source path respectively are assumed to be local, so it does not have to be prefaced by a filescheme.
Note: For these methods the destination and source path respectively are assumed to be local, so they do not have to be prefaced by a filescheme.

* The @Swineherd::Filesystem@ module implements a generic filesystem abstraction using schemed filepaths (hdfs://,s3://,file://).
The @Swineherd::Filesystem@ module implements a generic filesystem abstraction using schemed filepaths (hdfs://,s3://,file://).

* Currently only the following methods are supported for @Swineherd::Filesystem@:
Currently only the following methods are supported for @Swineherd::Filesystem@:

* @cp@
* @exists?@
Expand All @@ -82,7 +80,6 @@ h3. FileSystem
localfs = Swineherd::LocalFileSystem.new
hdfs.copy_to_local('foo/bar/baz.txt', 'foo/bar/baz.txt') unless localfs.exists? 'foo/bar/baz.txt'
</code></pre>


You can do:<pre><code>fs = Swineherd::Filesystem
fs.cp('hdfs://foo/bar/baz.txt','foo/bar/baz.txt') unless fs.exists?('foo/bar/baz.txt')
Expand Down

0 comments on commit 51d4d36

Please sign in to comment.