lib/rio/if/dir.rb in rio-0.4.2 vs lib/rio/if/dir.rb in rio-0.5.1

- old
+ new

@@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- #-- -# =============================================================================== -# Copyright (c) 2005,2006,2007,2008 Christopher Kleckner +# =========================================================================== +# Copyright (c) 2005-2012 Christopher Kleckner # All rights reserved # # This file is part of the Rio library for ruby. # # Rio is free software; you can redistribute it and/or modify @@ -16,26 +17,13 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Rio; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# =============================================================================== +# =========================================================================== #++ # -# To create the documentation for Rio run the command -# ruby build_doc.rb -# from the distribution directory. -# -# Suggested Reading -# * RIO::Doc::SYNOPSIS -# * RIO::Doc::INTRO -# * RIO::Doc::HOWTO -# * RIO::Doc::EXAMPLES -# * RIO::Rio -# - - module RIO module IF module Dir # Calls ::Dir#chdir. # @@ -61,11 +49,11 @@ # Calls Find#find # # Uses ::Find#find to find all entries recursively for a Rio that # specifies a directory. Note that there are other ways to recurse through - # a directory structure using a Rio. See IF::Grande#each and IF::GrandeEntry#all. + # a directory structure using a Rio. See {#each}[rdoc-ref:IF::Grande#each] and {#all}[rdoc-ref:IF::GrandeEntry#all]. # # Calls the block passing a Rio for each entry found. The Rio inherits # file attrubutes from the directory Rio. # # Returns itself @@ -83,24 +71,24 @@ # Calls ::Dir#glob # # Returns the filenames found by expanding the pattern given in string, # either as an array or as parameters to the block. In both cases the filenames # are expressed as a Rio. - # Note that this pattern is not a regexp (it’s closer to a shell glob). + # Note that this pattern is not a regexp (it�s closer to a shell glob). # See File::fnmatch for details of file name matching and the meaning of the flags parameter. # # def glob(string,*args,&block) target.glob(string,*args,&block) end # Calls ::Dir#rmdir # # Deletes the directory referenced by the Rio. - # Raises a subclass of SystemCallError if the directory isn’t empty. + # Raises a subclass of SystemCallError if the directory isn�t empty. # Returns the Rio. If the directory does not exist, just returns the Rio. # - # See also #rmtree, IF::Grande#delete, IF::Grande#delete! + # See also #rmtree, {#delete}[rdoc-ref:IF::Grande#delete], {#delete!}[rdoc-ref:IF::Grande#delete!] # # rio('adir').rmdir # remove the empty directory 'adir' # def rmdir() target.rmdir(); self end @@ -110,10 +98,10 @@ # Removes a directory Rio recursively. Returns the Rio. # If the directory does not exist, simply returns the Rio # # If called with a block, behaves as if <tt>rmtree.each(&block)</tt> had been called # - # See also IF::Grande#delete! + # See also {#delete!}[rdoc-ref:IF::Grande#delete!] # # rio('adir').rmtree # removes the directory 'adir' recursively # # # delete the directory 'adir', recreate it and then change to the new directory # rio('adir/asubdir').rmtree.mkpath.chdir {