mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* doc/etc.rd, doc/etc.rd.ja: moved from ext/etc.
* ext/etc.c (Init_etc): fixed rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
400afca88a
commit
9e67f6ecec
4 changed files with 38 additions and 26 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Apr 23 14:07:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* doc/etc.rd, doc/etc.rd.ja: moved from ext/etc.
|
||||
|
||||
* ext/etc.c (Init_etc): fixed rdoc.
|
||||
|
||||
Fri Apr 23 11:31:25 2010 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc: Update to RDoc 2.5.6.
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
.\" etc.txt - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995
|
||||
# etc.rd - -*- mode: rd; coding: us-ascii -*- created at: Fri Jul 14 00:47:15 JST 1995
|
||||
=begin
|
||||
|
||||
** Etc(Module)
|
||||
= Etc(Module)
|
||||
|
||||
The module to retrieve information under /etc directory. Available
|
||||
only on UNIX platforms. All operations defined in this module are
|
||||
module functions, so that you can include Etc module into your class.
|
||||
The module to retrieve information from running OS. All operations
|
||||
defined in this module are module functions, so that you can include
|
||||
Etc module into your class.
|
||||
|
||||
Module Function:
|
||||
== Module Function
|
||||
|
||||
getlogin
|
||||
--- getlogin
|
||||
|
||||
returns login name of the user. It this fails, try getpwuid().
|
||||
|
||||
getpwnam(name)
|
||||
--- getpwnam(name)
|
||||
|
||||
searches in /etc/passwd file (or equivalent database), and
|
||||
returns password entry for the user. The return value is an
|
||||
|
@ -37,13 +38,13 @@ Module Function:
|
|||
|
||||
See getpwnam(3) for detail.
|
||||
|
||||
getpwuid([uid])
|
||||
--- getpwuid([uid])
|
||||
|
||||
returns passwd entry for the specified user id. If uid is
|
||||
ommitted, use the value from getuid(). See getpwuid(3) for
|
||||
detail.
|
||||
|
||||
getgrgid(gid)
|
||||
--- getgrgid(gid)
|
||||
|
||||
searches in /etc/group file (or equivalent database), and
|
||||
returns group entry for the group id. The return value is an
|
||||
|
@ -58,15 +59,17 @@ Module Function:
|
|||
|
||||
See getgrgid(3) for detail.
|
||||
|
||||
getgrnam(name)
|
||||
--- getgrnam(name)
|
||||
|
||||
returns the group entry for the specified name. The return
|
||||
value is the group structure. See getgrnam(3) for detail.
|
||||
|
||||
group
|
||||
--- group
|
||||
|
||||
iterates over all group entries.
|
||||
|
||||
passwd
|
||||
--- passwd
|
||||
|
||||
iterates over all passwd entries.
|
||||
|
||||
=end
|
|
@ -1,18 +1,19 @@
|
|||
.\" etc.txt.ja - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995
|
||||
# etc.rd.ja - -*- mode: rd; coding: euc-jp; -*- created at: Fri Jul 14 00:47:15 JST 1995
|
||||
=begin
|
||||
|
||||
** Etc(モジュール)
|
||||
= Etc(モジュール)
|
||||
|
||||
/etcディレクトリ以下の情報を得るためのモジュール.クラスにインクルード
|
||||
実行しているOSからの情報を得るためのモジュール.クラスにインクルード
|
||||
して使うこともできる.
|
||||
|
||||
Module Function:
|
||||
== Module Function
|
||||
|
||||
getlogin
|
||||
--- getlogin
|
||||
|
||||
自分のlogin名を返す.これが失敗した場合はgetpwuid()を用いると
|
||||
良い.
|
||||
|
||||
getpwnam(name)
|
||||
--- getpwnam(name)
|
||||
|
||||
/etc/passwdファイル(あるいはDBMファイルやNISデータベース)を検
|
||||
索し,nameの名前を持つpasswdエントリを返す.戻り値はpasswd構造
|
||||
|
@ -37,13 +38,13 @@ Module Function:
|
|||
|
||||
詳細はgetpwnam(3)を参照のこと.
|
||||
|
||||
getpwuid([uid])
|
||||
--- getpwuid([uid])
|
||||
|
||||
uidをユーザIDとするpasswdエントリを返す.戻り値はgetpwnam()と
|
||||
同様である.引数を省略した場合にはgetuid()の値を用いる.詳細は
|
||||
getpwuid(3)を参照のこと.
|
||||
|
||||
getgrgid(gid)
|
||||
--- getgrgid(gid)
|
||||
|
||||
/etc/groupファイル(あるいは…getpwnam参照)を検索し,gidをグルー
|
||||
プIDとするグループエントリを返す.戻り値はgroup構造体で以下の
|
||||
|
@ -58,15 +59,17 @@ Module Function:
|
|||
|
||||
詳細はgetgrgid(3)を参照のこと.
|
||||
|
||||
getgrnam(name)
|
||||
--- getgrnam(name)
|
||||
|
||||
nameという名前のグループエントリを返す.戻り値はgetgrgid()と同
|
||||
様である.詳細はgetgrnam(3)を参照.
|
||||
|
||||
group
|
||||
--- group
|
||||
|
||||
全てのグループエントリを順にアクセスするためのイテレータ.
|
||||
|
||||
passwd
|
||||
--- passwd
|
||||
|
||||
全てのpasswdエントリを順にアクセスするためのイテレータ.
|
||||
|
||||
=end
|
|
@ -549,8 +549,8 @@ etc_getgrent(VALUE obj)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
/* The etc module provides access to information from the /etc/passwd and
|
||||
* /etc/group files on Linux and Unix systems.
|
||||
/*
|
||||
* The etc module provides access to information from the running OS.
|
||||
*
|
||||
* Documented by mathew <meta@pobox.com>.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue