FAQ

svn commit: r882424 - in /lucene/lucy/trunk: core/Lucy/Store/Folder.bp core/Lucy/Store/Folder.c perl/lib/Lucy/Store/Folder.pm

Marvin
Nov 20, 2009 at 6:03 am
Author: marvin
Date: Fri Nov 20 06:03:19 2009
New Revision: 882424

URL: http://svn.apache.org/viewvc?rev=882424&view=rev
Log:
Commit LUCY-67, adding Lucy::Store::Folder.

Added:
lucene/lucy/trunk/core/Lucy/Store/Folder.bp (with props)
lucene/lucy/trunk/core/Lucy/Store/Folder.c (with props)
lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm (with props)

Added: lucene/lucy/trunk/core/Lucy/Store/Folder.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/Folder.bp?rev=882424&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/Folder.bp (added)
+++ lucene/lucy/trunk/core/Lucy/Store/Folder.bp Fri Nov 20 06:03:19 2009
@@ -0,0 +1,256 @@
+parcel Lucy;
+
+/** Abstract class representing a directory.
+ *
+ * A "file" within a Folder might be a real file on disk -- or it might be a
+ * RAM buffer. Similarly, Delete() might delete a file from the file system, or
+ * a key-value pair from a hash, or something else.
+ *
+ * The archetypal implementation of Folder,
+ * L<FSFolder|Lucy::Store::FSFolder>, represents a directory on
+ * the file system holding a collection of files.
+ */
+abstract class Lucy::Store::Folder extends Lucy::Object::Obj {
+
+ CharBuf *path;
+ Hash *entries;
+
+ public inert Folder*
+ init(Folder *self, const CharBuf *path);
+
+ public void
+ Destroy(Folder *self);
+
+ /** Getter for <code>path</code> member var.
+ */
+ public CharBuf*
+ Get_Path(Folder *self);
+
+ /** Setter for <code>path</code> member var.
+ */
+ void
+ Set_Path(Folder *self, const CharBuf *path);
+
+ /** Open an OutStream, or set Err_error and return NULL on failure.
+ *
+ * @param path A relative filepath.
+ * @return an OutStream, or NULL.
+ */
+ public incremented OutStream*
+ Open_Out(Folder *self, const CharBuf *path);
+
+ /** Open an InStream, or set Err_error and return NULL on failure.
+ *
+ * @param path A relative filepath.
+ * @return an InStream, or NULL.
+ */
+ public incremented InStream*
+ Open_In(Folder *self, const CharBuf *path);
+
+ /** Open a FileHandle, or set Err_error and return NULL on failure.
+ *
+ * @param path A relative filepath.
+ * @param flags FileHandle flags.
+ * @return a FileHandle, or NULL.
+ */
+ public incremented FileHandle*
+ Open_FileHandle(Folder *self, const CharBuf *path, u32_t flags);
+
+ /** Open a DirHandle or set Err_error and return NULL on failure.
+ *
+ * @param path Path to a subdirectory, relative to the Folder's path. If
+ * empty or NULL, returns a DirHandle for this Folder.
+ * @return a DirHandle, or NULL.
+ */
+ public incremented DirHandle*
+ Open_Dir(Folder *self, const CharBuf *path = NULL);
+
+ /** Create a subdirectory.
+ *
+ * @param path A relative filepath.
+ * @return true on success, false on failure (sets Err_error).
+ */
+ public bool_t
+ MkDir(Folder *self, const CharBuf *path);
+
+ /** List all local entries within a directory. Set Err_error and return
+ * NULL if something goes wrong.
+ *
+ * @param path A relative filepath optionally specifying a subdirectory.
+ * @return an unsorted array of filenames.
+ */
+ incremented VArray*
+ List(Folder *self, const CharBuf *path = NULL);
+
+ /** Recursively list all files and directories in the Folder.
+ *
+ * @return an unsorted array of relative filepaths.
+ */
+ incremented VArray*
+ List_R(Folder *self);
+
+ /** Indicate whether an entity exists at <code>path</code>.
+ *
+ * @param path A relative filepath.
+ * @return true if <code>path</code> exists.
+ */
+ public bool_t
+ Exists(Folder *self, const CharBuf *path);
+
+ /** Delete an entry from the folder.
+ *
+ * @param path A relative filepath.
+ * @return true if the deletion was successful.
+ */
+ public bool_t
+ Delete(Folder *self, const CharBuf *path);
+
+ /** Delete recursively, starting at <code>path</code>
+ *
+ * @param path A relative filepath specifying a file or subdirectory.
+ * @return true if the whole tree is deleted successfully, false if any
+ * part remains.
+ */
+ public bool_t
+ Delete_Tree(Folder *self, const CharBuf *path);
+
+ /** Rename a file or directory, or set Err_error and return false on
+ * failure. If an entry exists at <code>to</code>, it will be removed.
+ *
+ * @param from The filepath prior to renaming.
+ * @param to The filepath after renaming.
+ * @return true on success, false on failure.
+ */
+ public abstract bool_t
+ Rename(Folder *self, const CharBuf *from, const CharBuf *to);
+
+ /** Create a hard link at path <code>to</code> pointing at the existing
+ * file <code>from</code>, or set Err_error and return false on failure.
+ *
+ * @return true on success, false on failure.
+ */
+ public abstract bool_t
+ Hard_Link(Folder *self, const CharBuf *from, const CharBuf *to);
+
+ /** Read a file and return its contents.
+ *
+ * @param path A relative filepath.
+ * @param return the file's contents.
+ */
+ public incremented ByteBuf*
+ Slurp_File(Folder *self, const CharBuf *path);
+
+ /** Given a filepath, return the Folder representing everything except
+ * the last component. E.g. the 'foo/bar' Folder for '/foo/bar/baz.txt',
+ * the 'foo' Folder for 'foo/bar', etc.
+ *
+ * If <code>path</code> is invalid, because an intermediate directory
+ * either doesn't exist or isn't a directory, return NULL.
+ */
+ Folder*
+ Enclosing_Folder(Folder *self, const CharBuf *path);
+
+ /** Return the Folder at the subdirectory specified by <code>path</code>.
+ * If <code>path</code> is NULL or an empty string, return this Folder.
+ * If the entity at <code>path</code> either doesn't exist or isn't a
+ * subdirectory, return NULL.
+ *
+ * @param path A relative filepath specifying a subdirectory.
+ * @return A Folder, or NULL.
+ */
+ Folder*
+ Find_Folder(Folder *self, const CharBuf *path);
+
+ /** Perform implementation-specific initialization. For example: FSFolder
+ * creates its own directory.
+ */
+ public abstract void
+ Initialize(Folder *self);
+
+ /** Verify that operations may be performed on this Folder.
+ *
+ * @return true on success.
+ */
+ public abstract bool_t
+ Check(Folder *self);
+
+ /** Close the folder and release implementation-specific resources.
+ */
+ public abstract void
+ Close(Folder *self);
+
+ /** Open a FileHandle for a local file, or set Err_error and return NULL
+ * on failure.
+ */
+ abstract incremented FileHandle*
+ Local_Open_FileHandle(Folder *self, const CharBuf *name, u32_t flags);
+
+ /** Open an InStream for a local file, or set Err_error and return NULL on
+ * failure.
+ */
+ incremented InStream*
+ Local_Open_In(Folder *self, const CharBuf *name);
+
+ /** Open a DirHandle to iterate over the local entries in this Folder, or
+ * set Err_error and return NULL on failure.
+ */
+ abstract incremented DirHandle*
+ Local_Open_Dir(Folder *self);
+
+ /** Create a local subdirectory.
+ *
+ * @param name The name of the subdirectory.
+ * @return true on success, false on failure (sets Err_error)
+ */
+ abstract bool_t
+ Local_MkDir(Folder *self, const CharBuf *name);
+
+ /** Indicate whether a local entry exists for the supplied
+ * <code>name</code>.
+ *
+ * @param name The name of the local entry.
+ */
+ abstract bool_t
+ Local_Exists(Folder *self, const CharBuf *name);
+
+ /** Indicate whether a local subdirectory exists with the supplied
+ * <code>name</code>.
+ *
+ * @param name The name of the local subdirectory.
+ */
+ abstract bool_t
+ Local_Is_Directory(Folder *self, const CharBuf *name);
+
+ /** Return the Folder object representing the specified directory, if such
+ * a directory exists.
+ *
+ * @param name The name of a local directory.
+ * @return a Folder, or NULL.
+ */
+ abstract Folder*
+ Local_Find_Folder(Folder *self, const CharBuf *name);
+
+ /** Delete a local entry.
+ *
+ * @param name The name of the entry to be deleted.
+ * @return true if the deletion was successful.
+ */
+ abstract bool_t
+ Local_Delete(Folder *self, const CharBuf *name);
+}
+
+/* Copyright 2009 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Store/Folder.bp
------------------------------------------------------------------------------
svn:eol-style = native

Added: lucene/lucy/trunk/core/Lucy/Store/Folder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/Folder.c?rev=882424&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/Folder.c (added)
+++ lucene/lucy/trunk/core/Lucy/Store/Folder.c Fri Nov 20 06:03:19 2009
@@ -0,0 +1,450 @@
+#define C_LUCY_FOLDER
+#include "Lucy/Util/ToolSet.h"
+#include <ctype.h>
+#include <limits.h>
+
+#ifndef SIZE_MAX
+ #define SIZE_MAX ((size_t)-1)
+#endif
+
+#include "Lucy/Store/Folder.h"
+#include "Lucy/Store/DirHandle.h"
+#include "Lucy/Store/FileHandle.h"
+#include "Lucy/Store/InStream.h"
+#include "Lucy/Store/OutStream.h"
+#include "Lucy/Util/IndexFileNames.h"
+
+Folder*
+Folder_init(Folder *self, const CharBuf *path)
+{
+ /* Init. */
+ self->entries = Hash_new(16);
+
+ /* Copy. */
+ if (path == NULL) {
+ self->path = CB_new_from_trusted_utf8("", 0);
+ }
+ else {
+ /* Copy path, strip trailing slash or equivalent. */
+ self->path = CB_Clone(path);
+ if (CB_Ends_With_Str(self->path, DIR_SEP, strlen(DIR_SEP))) {
+ CB_Chop(self->path, 1);
+ }
+ }
+
+ ABSTRACT_CLASS_CHECK(self, FOLDER);
+ return self;
+}
+
+void
+Folder_destroy(Folder *self)
+{
+ DECREF(self->path);
+ DECREF(self->entries);
+ SUPER_DESTROY(self, FOLDER);
+}
+
+InStream*
+Folder_open_in(Folder *self, const CharBuf *path)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+ InStream *instream = NULL;
+
+ if (enclosing_folder) {
+ ZombieCharBuf name_zcb = ZCB_BLANK;
+ ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
+ instream = Folder_Local_Open_In(enclosing_folder, (CharBuf*)name);
+ if (!instream) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+ else {
+ Err_set_error(Err_new(CB_newf("Invalid path: '%o'", path)));
+ }
+
+ return instream;
+}
+
+/* This method exists as a hook for CompoundFileReader to override; it is
+ * necessary because calling CFReader_Local_Open_FileHandle() won't find
+ * virtual files. No other class should need to override it. */
+InStream*
+Folder_local_open_in(Folder *self, const CharBuf *name)
+{
+ FileHandle *fh = Folder_Local_Open_FileHandle(self, name, FH_READ_ONLY);
+ InStream *instream = NULL;
+ if (fh) {
+ instream = InStream_open((Obj*)fh);
+ DECREF(fh);
+ if (!instream) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+ else {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ return instream;
+}
+
+OutStream*
+Folder_open_out(Folder *self, const CharBuf *path)
+{
+ const u32_t flags = FH_WRITE_ONLY | FH_CREATE | FH_EXCLUSIVE;
+ FileHandle *fh = Folder_Open_FileHandle(self, path, flags);
+ OutStream *outstream = NULL;
+ if (fh) {
+ outstream = OutStream_open((Obj*)fh);
+ DECREF(fh);
+ if (!outstream) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+ else {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ return outstream;
+}
+
+FileHandle*
+Folder_open_filehandle(Folder *self, const CharBuf *path, u32_t flags)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+ FileHandle *fh = NULL;
+
+ if (enclosing_folder) {
+ ZombieCharBuf name_zcb = ZCB_BLANK;
+ ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
+ fh = Folder_Local_Open_FileHandle(enclosing_folder,
+ (CharBuf*)name, flags);
+ if (!fh) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+ else {
+ Err_set_error(Err_new(CB_newf("Invalid path: '%o'", path)));
+ }
+
+ return fh;
+}
+
+bool_t
+Folder_delete(Folder *self, const CharBuf *path)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+ if (enclosing_folder) {
+ ZombieCharBuf name_zcb = ZCB_BLANK;
+ ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
+ bool_t result = Folder_Local_Delete(enclosing_folder, (CharBuf*)name);
+ return result;
+ }
+ else {
+ return false;
+ }
+}
+
+bool_t
+Folder_delete_tree(Folder *self, const CharBuf *path)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+
+ /* Don't allow Folder to delete itself. */
+ if (!path || !CB_Get_Size(path)) { return false; }
+
+ if (enclosing_folder) {
+ ZombieCharBuf entry_zcb = ZCB_BLANK;
+ ZombieCharBuf *local = IxFileNames_local_part(path, &entry_zcb);
+ if (Folder_Local_Is_Directory(enclosing_folder, (CharBuf*)local)) {
+ Folder *inner_folder
+ = Folder_Local_Find_Folder(enclosing_folder, (CharBuf*)local);
+ DirHandle *dh = Folder_Local_Open_Dir(inner_folder);
+ if (dh) {
+ VArray *files = VA_new(20);
+ CharBuf *entry = DH_Get_Entry(dh);
+ u32_t i, max;
+ while (DH_Next(dh)) {
+ VA_Push(files, (Obj*)CB_Clone(entry));
+ }
+ for (i = 0, max = VA_Get_Size(files); i < max; i++) {
+ CharBuf *name = (CharBuf*)VA_Fetch(files, i);
+ if (Folder_Local_Is_Directory(inner_folder, name)) {
+ bool_t success
+ = Folder_Delete_Tree(inner_folder, name);
+ if (!success) { break; }
+ }
+ else {
+ bool_t success
+ = Folder_Local_Delete(inner_folder, name);
+ if (!success) { break; }
+ }
+ }
+ DECREF(files);
+ DECREF(dh);
+ }
+ }
+ return Folder_Local_Delete(enclosing_folder, (CharBuf*)local);
+ }
+ else {
+ /* Return failure if the entry wasn't there in the first place. */
+ return false;
+ }
+}
+
+static bool_t
+S_is_updir(CharBuf *path)
+{
+ if (CB_Equals_Str(path, ".", 1) || CB_Equals_Str(path, "..", 2)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+static void
+S_add_to_file_list(Folder *self, VArray *list, CharBuf *dir, CharBuf *prefix)
+{
+ size_t orig_prefix_size = CB_Get_Size(prefix);
+ DirHandle *dh = Folder_Open_Dir(self, dir);
+ CharBuf *entry;
+
+ if (!dh) {
+ RETHROW(INCREF(Err_get_error()));
+ }
+
+ entry = DH_Get_Entry(dh);
+ while (DH_Next(dh)) { /* Updates entry */
+ if (!S_is_updir(entry)) {
+ CharBuf *relpath = CB_newf("%o%o", prefix, entry);
+ if (VA_Get_Size(list) == VA_Get_Capacity(list)) {
+ VA_Grow(list, VA_Get_Size(list) * 2);
+ }
+ VA_Push(list, (Obj*)relpath);
+
+ if (DH_Entry_Is_Dir(dh)) {
+ CharBuf *subdir = CB_Get_Size(dir)
+ ? CB_newf("%o/%o", dir, entry)
+ : CB_Clone(entry);
+ CB_catf(prefix, "%o/", entry);
+ S_add_to_file_list(self, list, subdir, prefix); /* recurse */
+ CB_Set_Size(prefix, orig_prefix_size);
+ DECREF(subdir);
+ }
+ }
+ }
+
+ if (!DH_Close(dh)) {
+ RETHROW(INCREF(Err_get_error()));
+ }
+ DECREF(dh);
+}
+
+DirHandle*
+Folder_open_dir(Folder *self, const CharBuf *path)
+{
+ DirHandle *dh = NULL;
+ Folder *folder = Folder_Find_Folder(self,
+ path ? path : (CharBuf*)&EMPTY);
+ if (!folder) {
+ Err_set_error(Err_new(CB_newf("Invalid path: '%o'", path)));
+ }
+ else {
+ dh = Folder_Local_Open_Dir(folder);
+ if (!dh) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+ return dh;
+}
+
+bool_t
+Folder_mkdir(Folder *self, const CharBuf *path)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+ bool_t result = false;
+
+ if (!CB_Get_Size(path)) {
+ Err_set_error(Err_new(CB_newf("Invalid path: '%o'", path)));
+ }
+ else if (!enclosing_folder) {
+ Err_set_error(Err_new(CB_newf(
+ "Can't recursively create dir %o", path)));
+ }
+ else {
+ ZombieCharBuf name_zcb = ZCB_BLANK;
+ ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
+ result = Folder_Local_MkDir(enclosing_folder, (CharBuf*)name);
+ if (!result) {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ }
+
+ return result;
+}
+
+bool_t
+Folder_exists(Folder *self, const CharBuf *path)
+{
+ Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
+ bool_t retval = false;
+ if (enclosing_folder) {
+ ZombieCharBuf name_zcb = ZCB_BLANK;
+ ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
+ if (Folder_Local_Exists(enclosing_folder, (CharBuf*)name)) {
+ retval = true;
+ }
+ }
+ return retval;
+}
+
+VArray*
+Folder_list(Folder *self, const CharBuf *path)
+{
+ Folder *local_folder = Folder_Find_Folder(self, path);
+ VArray *list = NULL;
+ DirHandle *dh = Folder_Local_Open_Dir(local_folder);
+ if (dh) {
+ CharBuf *entry = DH_Get_Entry(dh);
+ list = VA_new(32);
+ while (DH_Next(dh)) { VA_Push(list, (Obj*)CB_Clone(entry)); }
+ DECREF(dh);
+ }
+ else {
+ ERR_ADD_FRAME(Err_get_error());
+ }
+ return list;
+}
+
+VArray*
+Folder_list_r(Folder *self)
+{
+ CharBuf *prefix = CB_new(20);
+ CharBuf *dir = CB_new(20);
+ VArray *list = VA_new(32);
+ S_add_to_file_list(self, list, dir, prefix);
+ DECREF(prefix);
+ DECREF(dir);
+ return list;
+}
+
+ByteBuf*
+Folder_slurp_file(Folder *self, const CharBuf *path)
+{
+ InStream *instream = Folder_Open_In(self, path);
+ ByteBuf *retval = NULL;
+
+ if (!instream) {
+ RETHROW(INCREF(Err_get_error()));
+ }
+ else {
+ u64_t size = InStream_Length(instream);
+
+ if (size > SIZE_MAX) {
+ InStream_Close(instream);
+ DECREF(instream);
+ THROW(ERR, "File %o is too big to slurp (%u64 bytes)", path, size);
+ }
+ else {
+ char *ptr = (char*)MALLOCATE(size + 1);
+ InStream_Read_Bytes(instream, ptr, size);
+ ptr[size] = '\0';
+ retval = BB_new_steal_bytes(ptr, size, size + 1);
+ InStream_Close(instream);
+ DECREF(instream);
+ }
+ }
+
+ return retval;
+}
+
+CharBuf*
+Folder_get_path(Folder *self) { return self->path; }
+void
+Folder_set_path(Folder *self, const CharBuf *path)
+{
+ DECREF(self->path);
+ self->path = CB_Clone(path);
+}
+
+static Folder*
+S_enclosing_folder(Folder *self, ZombieCharBuf *path)
+{
+ ZombieCharBuf scratch;
+ ZombieCharBuf path_component;
+ size_t path_component_len = 0;
+ u32_t code_point;
+
+ /* Strip trailing slash. */
+ if (ZCB_Code_Point_From(path, 0) == '/') { ZCB_Chop(path, 1); }
+
+ /* Find first component of the file path. */
+ scratch = ZCB_make((CharBuf*)path);
+ path_component = ZCB_make((CharBuf*)path);
+ while (0 != (code_point = ZCB_Nip_One(&scratch))) {
+ if (code_point == '/') {
+ ZCB_Truncate(&path_component, path_component_len);
+ ZCB_Nip(path, path_component_len + 1);
+ break;
+ }
+ path_component_len++;
+ }
+
+ /** If we've eaten up the entire filepath, self is enclosing folder. */
+ if (ZCB_Get_Size(&scratch) == 0) { return self; }
+
+ {
+ Folder *local_folder
+ = Folder_Local_Find_Folder(self, (CharBuf*)&path_component);
+ if (!local_folder) {
+ /* This element of the filepath doesn't exist, or it's not a
+ * directory. However, there are filepath characters left over,
+ * implying that this component ought to be a directory -- so the
+ * original file path is invalid. */
+ return NULL;
+ }
+
+ /* This file path component is a folder. Recurse into it. */
+ return S_enclosing_folder(local_folder, path);
+ }
+}
+
+Folder*
+Folder_enclosing_folder(Folder *self, const CharBuf *path)
+{
+ ZombieCharBuf scratch = ZCB_make(path);
+ return S_enclosing_folder(self, &scratch);
+}
+
+Folder*
+Folder_find_folder(Folder *self, const CharBuf *path)
+{
+ if (!path || !CB_Get_Size(path)) {
+ return self;
+ }
+ else {
+ ZombieCharBuf scratch = ZCB_make(path);
+ Folder *enclosing_folder = S_enclosing_folder(self, &scratch);
+ if (!enclosing_folder) {
+ return NULL;
+ }
+ else {
+ return Folder_Local_Find_Folder(enclosing_folder,
+ (CharBuf*)&scratch);
+ }
+ }
+}
+
+/* Copyright 2009 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Store/Folder.c
------------------------------------------------------------------------------
svn:eol-style = native

Added: lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm?rev=882424&view=auto
==============================================================================
--- lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm (added)
+++ lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm Fri Nov 20 06:03:19 2009
@@ -0,0 +1,47 @@
+use Lucy;
+
+1;
+
+__END__
+
+__BINDING__
+
+Boilerplater::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Store::Folder",
+ bind_methods => [
+ qw(
+ Open_Out
+ Open_In
+ MkDir
+ List_R
+ Exists
+ Rename
+ Hard_Link
+ Delete
+ Slurp_File
+ Close
+ Get_Path
+ )
+ ],
+ bind_constructors => ["new"],
+);
+
+__COPYRIGHT__
+
+ /**
+ * Copyright 2009 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/perl/lib/Lucy/Store/Folder.pm
------------------------------------------------------------------------------
svn:eol-style = native
reply

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post

1 user in discussion

Marvin: 1 post