# Reg : difference between gr.file\_descriptor\_source/sink and gr.file\_source/sink

**URL:** <https://www.ruby-forum.com/t/reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink/223691>\
**Category:** GNU Radio\
**Created:** [October 14, 2012, 4:19pm UTC](https://www.ruby-forum.com/t/reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink/223691 "2012-10-14T16:19:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 14, 2012, 4:19pm UTC](https://www.ruby-forum.com/t/reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink/223691/1 "2012-10-14T16:19:50Z")

</div>

Q: What is the difference between gr.file\_descriptor\_source/sink and  
gr.file\_source/sink … I mean when shall we prefer one over other ?

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink-tp37991.html](http://gnuradio.4.n7.nabble.com/Reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink-tp37991.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![sumitstop](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sumitstop](https://www.ruby-forum.com/u/sumitstop)\
**Post date:** [October 15, 2012, 4:28pm UTC](https://www.ruby-forum.com/t/reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink/223691/2 "2012-10-15T16:28:51Z")

</div>

On Sun, Oct 14, 2012 at 10:18 AM, sumitstop  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Q: What is the difference between gr.file\_descriptor\_source/sink and  
> gr.file\_source/sink .. I mean when shall we prefer one over other ?

file\_source/sink takes in a string for a file name. This block will  
create a new file with that name.

file\_descriptor\_source/sink takes in a file descriptor and writes to  
that. This means you create your file descriptor externally and pass  
it to the block. The file descriptor can be anything, now, an actual  
file, FIFO, device, etc.

Tom

---

<div class="post-metadata">

**Author:** ![sumitstop](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sumitstop](https://www.ruby-forum.com/u/sumitstop)\
**Post date:** [October 16, 2012, 1:30am UTC](https://www.ruby-forum.com/t/reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink/223691/3 "2012-10-16T01:30:30Z")

</div>

Thanks Tom … got it !!

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink-tp37991p38015.html](http://gnuradio.4.n7.nabble.com/Reg-difference-between-gr-file-descriptor-source-sink-and-gr-file-source-sink-tp37991p38015.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
