lchmod(mode, *filename) -> Integer[permalink][rdoc][edit]-
File.chmod と同様ですが、シンボリックリンクに関してリンクそのもののモードを変更します。
- [PARAM]
filename: - ファイル名を表す文字列を指定します。
- [PARAM]
mode: - chmod(2) と同様に整数で指定します。
- [EXCEPTION]
NotImplementedError: - lchmod(2) を実装していないシステムでこのメソッドを呼び出すと発生します。
- [EXCEPTION]
Errno::EXXX: - モードの変更に失敗した場合に発生します。
IO.write("testfile", "test") File.symlink("testfile", "testlink") p File.lstat("testlink").ftype # => "link" File.lchmod(0744, "testlink") p File.stat("testlink").mode.to_s(8) # => "100644" p File.lstat("testlink").mode.to_s(8) # => "120744" - [PARAM]