# Non-directory, non-file "files"

**URL:** <https://www.ruby-forum.com/t/non-directory-non-file-files/72895>\
**Category:** Ruby\
**Created:** [October 19, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895 "2006-10-19T18:02:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 19, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895/1 "2006-10-19T18:02:59Z")

</div>

If they’re not directories, and they’re not files, then what the heck  
are they?

C:\Documents and Settings\gavin.kistner\>ruby -rfind -e  
“Find.find(’.’){|x| p(x) unless File.directory?(x) or File.file?(x) }”

“./Local Settings/Temporary Internet  
Files/Content.IE5/T7JZHP42/GGLD%3A2005-16%2CGGLD%3Aen%26q%3Ddsl%2Bcentra  
l%2Boffice%2Blocations%2Bmap&cc=483&u\_h=1200&u\_w=1600&u\_ah=1170&u\_aw=160  
0&u\_cd=32&u\_tz=-360&u\_his=11&u\_java=true”  
“./Local Settings/Temporary Internet  
Files/Content.IE5/S1MNKLUJ/eamxbox&dechannel=teamxbox&size=skyscraper&re  
gspeed=-1&PageId=1160506887961&random=1160506887961&property=teamxbox&ar  
ticletype=movie+popup&tile=1160506891458”  
“./Local Settings/Temporary Internet  
Files/Content.IE5/Q93CTSZU/teamxbox&dechannel=teamxbox&size=1x1&regspeed  
=-1&name=ATAtracker&PageId=1160506887304&random=1160506887304&ct=js&prop  
erty=teamxbox&articletype=movie%2Bpopup&”  
“./Local Settings/Temporary Internet  
Files/Content.IE5/PCO7XLCT/site=teamxbox&dechannel=teamxbox&size=text&re  
gspeed=-1&PageId=1160506893711&random=1160506893711&property=teamxbox&ar  
ticletype=movie+popup&tile=1160506893958”  
“./Local Settings/Temporary Internet  
Files/Content.IE5/0F17EUFT/CAZUHWT7.php%3Fgroup\_id%3D50233%26package\_id%  
3D43880%26release\_id%3D413309&cc=100&u\_h=1200&u\_w=1600&u\_ah=1170&u\_aw=16  
00&u\_cd=32&u\_tz=-360&u\_his=2&u\_java=true”

Are there similar items on non-Windows systems? (Items that would be  
listed by Find.find or Dir.entries that would respond false to both  
.directory? and .file?

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 19, 2006, 6:11pm UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895/2 "2006-10-19T18:11:00Z")

</div>

On Oct 19, 2006, at 12:02 PM, Gavin K. wrote:

> If they’re not directories, and they’re not files, then what the heck  
> are they?

symbolic links?

Gary W.

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 19, 2006, 6:19pm UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895/3 "2006-10-19T18:19:02Z")

</div>

On Fri, 20 Oct 2006, Gavin K. wrote:

> “./Local Settings/Temporary Internet  
> ticletype=movie+popup&tile=1160506893958”  
> “./Local Settings/Temporary Internet  
> Files/Content.IE5/0F17EUFT/CAZUHWT7.php%3Fgroup\_id%3D50233%26package\_id%  
> 3D43880%26release\_id%3D413309&cc=100&u\_h=1200&u\_w=1600&u\_ah=1170&u\_aw=16  
> 00&u\_cd=32&u\_tz=-360&u\_his=2&u\_java=true”
> 
> Are there similar items on non-Windows systems? (Items that would be  
> listed by Find.find or Dir.entries that would respond false to both  
> .directory? and .file?

irb(main):010:0\> File.file? ‘/dev/cdrom’  
=\> false  
irb(main):011:0\> File.directory? ‘/dev/cdrom’  
=\> false  
irb(main):012:0\> File.blockdev? ‘/dev/cdrom’  
=\> true

-a

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 19, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895/4 "2006-10-19T18:55:31Z")

</div>

On Fri, Oct 20, 2006 at 01:10:30AM +0900, removed\_email\_address@domain.invalid wrote:

> On Oct 19, 2006, at 12:02 PM, Gavin K. wrote:
> 
> > If they’re not directories, and they’re not files, then what the heck  
> > are they?
> 
> symbolic links?

Only if they were broken symlinks (otherwise they would be followed to  
determine type).

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 20, 2006, 12:01am UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895/5 "2006-10-20T00:01:53Z")

</div>

removed\_email\_address@domain.invalid wrote:

> On Oct 19, 2006, at 12:02 PM, Gavin K. wrote:
> 
> > If they’re not directories, and they’re not files, then what the heck  
> > are they?
> 
> symbolic links?

Named Pipes  
Char Devices  
Block Devices  
Sockets (Unix, TCP)  
Soft Links  
Virtual Devices (is this the proper name? I mean Linux’s /proc, probably  
just char dev with a special driver)

I cannot think of more off the top of my head but there are probably.

Depends on the OS of course (I could not see the original post via news,  
Gateway issues again?)

```
robert
```
