• R/O
  • SSH
  • HTTPS

perl-fuse-fv: Commit


Commit MetaInfo

Revision70 (tree)
Zeit2011-07-05 23:05:40
Autortofjw

Log Message

documentation reached to the removexattr method.

Ändern Zusammenfassung

Diff

--- Fuse-Class/trunk/lib/Fuse/Class.pm (revision 69)
+++ Fuse-Class/trunk/lib/Fuse/Class.pm (revision 70)
@@ -64,9 +64,9 @@
6464
6565 Exception handling:
6666
67-Return value will be treated as errno in Fuse way, but you can use
68-exception, too.
69-If exception is thrown in your method (die is called), $! will be used
67+Returned value will be treated as negative errno in Fuse way, but you can
68+use exception, too.
69+If exception is thrown in your method ("die" is called), $! will be used
7070 as errno to notify error to Fuse.
7171
7272
@@ -214,18 +214,18 @@
214214
215215 =head2 getattr(PATH_NAME)
216216
217-Returns a list of file attributes. Meaning of fields are same as
217+Return a list of file attributes. Meaning of fields are same as
218218 "stat" function like this:
219219
220220 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
221221 $atime,$mtime,$ctime,$blksize,$blocks)
222222
223-On error, returns scalar value like -ENOENT().
223+On error, return scalar value like -ENOENT().
224224
225225 =head2 readlink(PATH_NAME)
226226
227227 This method is called to dereference symbolic link.
228-Returns a destination path string or numeric error value.
228+Return a destination path string or numeric error value.
229229
230230 By Default implementation, returns -ENOENT().
231231 You can leave this method if your FS does not have symlink.
@@ -238,7 +238,7 @@
238238
239239 =head2 getdir(DIRECTORY_NAME)
240240
241-Returns a list of file/directory names and an errno (0 if success).
241+Return a list of file/directory names and an errno (0 if success).
242242 ex: ('.', 'a', 'b', 0)
243243
244244 If 'readdir' method is implemented, this function will never be called.
@@ -245,7 +245,7 @@
245245
246246 =head2 mknod(PATH_NAME, MODE, DEVNO)
247247
248-Returns an errno (0 if success).
248+Return an errno (0 if success).
249249 This method is called to create an entity (device or file).
250250
251251 =head2 mkdir(DIRECTORY_NAME, MODE)
@@ -389,13 +389,20 @@
389389
390390 =head2 setxattr(PATH_NAME, ATTR_NAME, ATTR_VALUE, FLAGS)
391391
392-Returns an errno, and a file handle (optional)
392+FLAGS is OR-ed value of Fuse::XATTR_CREATE and Fuse::XATTR_REPLACE
393393
394-This method is called to read data (SIZE bytes)
395-at the given offset of opened file.
394+Return an errno (0 if success).
396395
396+This method is called to set extended attribute.
397+
398+-EOPNOTSUPP means that setting the attribute is rejected.
399+
400+If XATTR_CREATE is passed and the attribute already exists, return -EEXIST.
401+
402+If XATTR_REPLACE is passed and the attribute does not exist, return -ENOATTR.
403+
397404 By default implementation, returns -EOPNOTSUPP.
398-You can leave this method if your FS does not have any extended attrs.
405+You can leave this method if your FS does not have any extended attributes.
399406
400407 =cut
401408
@@ -403,11 +410,15 @@
403410 return -Errno::EOPNOTSUPP();
404411 }
405412
406-=head2 getxattr
413+=head2 getxattr(PATH_NAME, ATTR_NAME)
407414
408-Same as Fuse. By default implementation, returns 0.
409-You can leave this method if your FS does not have any extended attrs.
415+Return attribute value or errno (0 if no value).
410416
417+This method is called to get extended attribute value.
418+
419+By default implementation, returns 0.
420+You can leave this method if your FS does not have any extended attributes.
421+
411422 =cut
412423
413424 sub getxattr {
@@ -414,11 +425,14 @@
414425 return 0;
415426 }
416427
417-=head2 listxattr
428+=head2 listxattr(PATH_NAME)
418429
419-Same as Fuse. By default implementation, returns 0.
420-You can leave this method if your FS does not have any extended attrs.
430+Returns a list of attribute names and an errno (0 if success).
431+ex: ('attr1', 'attr2', 'attr3', 0)
421432
433+By default implementation, returns 0.
434+You can leave this method if your FS does not have any extended attributes.
435+
422436 =cut
423437
424438 sub listxattr {
@@ -425,11 +439,15 @@
425439 return 0;
426440 }
427441
428-=head2 removexattr
442+=head2 removexattr(PATH_NAME, ATTR_NAME)
429443
430-Same as Fuse. By default implementation, returns 0.
431-You can leave this method if your FS does not have any extended attrs.
444+Return an errno (0 if success).
432445
446+This method is called to remove an attribute from entity.
447+
448+By default implementation, returns 0.
449+You can leave this method if your FS does not have any extended attributes.
450+
433451 =cut
434452
435453 sub removexattr {
Show on old repository browser