# FileUtils.cp

**URL:** <https://www.ruby-forum.com/t/fileutils-cp/69752>\
**Category:** Ruby\
**Created:** [September 23, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/fileutils-cp/69752 "2006-09-23T21:09:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 23, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/fileutils-cp/69752/1 "2006-09-23T21:09:43Z")

</div>

Hey,

It’s great to see that FileUtils has Unix friendly methods, so it feels  
like  
working in the shell. However, I’d prefer to just type cp and not  
FileUtils.cp. Is there a way to import those methods into Kernel so I  
don’t  
have to qualify them all?

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 24, 2006, 4:25am UTC](https://www.ruby-forum.com/t/fileutils-cp/69752/2 "2006-09-24T04:25:28Z")

</div>

Michael P. Soulier wrote:

> Hey,
> 
> It’s great to see that FileUtils has Unix friendly methods, so it feels  
> like  
> working in the shell. However, I’d prefer to just type cp and not  
> FileUtils.cp. Is there a way to import those methods into Kernel so I  
> don’t  
> have to qualify them all?

FileUtils is a module so you can #include or #extend.

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [October 18, 2006, 10:43am UTC](https://www.ruby-forum.com/t/fileutils-cp/69752/3 "2006-10-18T10:43:26Z")

</div>

Hello !

> It’s great to see that FileUtils has Unix friendly methods, so it feels like  
> working in the shell. However, I’d prefer to just type cp and not  
> FileUtils.cp. Is there a way to import those methods into Kernel so I don’t  
> have to qualify them all?

include FileUtils

```
Vince
```

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [October 18, 2006, 10:43am UTC](https://www.ruby-forum.com/t/fileutils-cp/69752/4 "2006-10-18T10:43:31Z")

</div>

On 23/09/06 Vincent F. said:

> include FileUtils

Ah, perfect. I didn’t realize that it was a module.

Mike

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [October 18, 2006, 10:43am UTC](https://www.ruby-forum.com/t/fileutils-cp/69752/5 "2006-10-18T10:43:32Z")

</div>

Michael P. Soulier wrote:

> > include FileUtils
> 
> Ah, perfect. I didn’t realize that it was a module.

Try

ri FileUtils

It does say it is a module… And anyway, it is a good reflex to look  
at what ri is saying when you’d like to know something 😉 !

```
Vince
```
