[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

daz (or others) permissioning problem going on?...

Kurt Euler

10/6/2003 4:07:00 AM

daz (or anyone)-

Thanks for your suggestion way below. It looks very promissing, but it seems I'm having momentary permissioning problems on my NT machine. Please assist if you can. When I run this code...

require 'ftools'
TARGET = 'C:/test/rbcopies' # target directory
Dir.mkdir(TARGET) unless File.directory?(TARGET)

for f in Dir.glob("./**/*")
next unless File.file?(f)
#
# check for exists? / read-only etc.
#
File.syscopy(f, TARGET)
end

... I get this error:

test44.rb:3:in `mkdir': No such file or directory - C:/test/rbcopies (Errno::ENOENT)
from test44.rb:3

When I change the drive letter in TARGET (line 2) from C: to D:, I get this error:

c:/ruby/lib/ruby/1.8/ftools.rb:23:in `initialize': Permission denied - D:/test/rbcopies/PJF_AppCenter_FnS.doc (Errno::EACCES)
from c:/ruby/lib/ruby/1.8/ftools.rb:23:in `open'
from c:/ruby/lib/ruby/1.8/ftools.rb:23:in `syscopy'
from test44.rb:10
from test44.rb:5:in `each'
from test44.rb:5

Clearly there's a permissioning issue here, but in NT I've given "Everyone" full control of both drives.

Thanks!

Kurt Euler





Subject: Re: 2 simple file copying questions, please assist...
From: "daz" <dooby@d10.karoo.co.uk>
Date: Sat, 4 Oct 2003 16:33:37 +0900
References: 83616 </cgi-bin/scat.rb/ruby/ruby-talk/83616>
"Kurt Euler" <keuler@portal.com> wrote:

>
> 2) The following code was recommended to me by Matz some time ago.
> What I want to know is, what do I replace <do_stuff_here> with
> to copy every file found under "some_directory" to single target directory,
> without reproducing the path structure. Result would be a single flat
> directory some_target. (Not controlling for possible file duplicate
> overwriting for the moment.)
>
>
> for f in Dir.glob("./some_directory/**/*")
> File.open(f) { |file|
> <do_stuff_here>
> }if File.file?(f)
> end
>

syscopy (in 'ftools' lib) can take a directory as its target
and copies the source files' basename.

#------------

require "ftools"

TARGET = 'C:/TEMP/rbcopies' # target directory
Dir.mkdir(TARGET) unless File.directory?(TARGET)

for f in Dir.glob("./some_directory/**/*")
next unless File.file?(f)
#
# check for exists? / read-only etc.
#
File.syscopy(f, TARGET)
end

#------------


daz






9 Answers

daz

10/6/2003 5:57:00 AM

0


"Kurt Euler" <keuler@portal.com> wrote:

> [...] When I run this code...
>
> require 'ftools'
> TARGET = 'C:/test/rbcopies' # target directory
> Dir.mkdir(TARGET) unless File.directory?(TARGET)
>
> for f in Dir.glob("./**/*")
> next unless File.file?(f)
> #
> # check for exists? / read-only etc.
> #
> File.syscopy(f, TARGET)
> end
>
> .. I get this error:
>
> test44.rb:3:in `mkdir': No such file or directory - C:/test/rbcopies (Errno::ENOENT)
> from test44.rb:3
>

The example I gave assumed that C:\TEMP exists already.
If 'C:\test' doesn't exist, mkdir won't be able to create sub-directory 'C:\test\rbcopies'.

I'm on Win98, so I can't help with permissions, sorry.


daz



Giftzwerg

11/11/2009 4:06:00 PM

0

In article <bML6SkuoqY9VoCCraouAI1dmkcwI@4ax.com>,
fakeaddress@hotmail.com says...

> >But even the Dear Leader - Zero himself! - points out that some 47
> >million Americans are without healthcare benefits ... and that's using
> >the biggest number he pulled out of his ass. Or, another way to look at
> >it is to point out that this means 84% of Americans *do* have healthcare
> >benefits. On any scale of "better," a system which delivers
> >demonstrably *better* healthcare to 84% of the people pretty much beats
> >the shit outta Cuba *or* Belgium.
>
> You're assuming that everyone in the US who does have coverage has
> better coverage than you'd have in Europe. I know a lot of people with
> shitty health plans. And even some of the people here where I work,
> which has excellent coverage, are screwed when it comes to health
> care. People that have family members with a serious medical problem
> can't change jobs. Since it's a pre-existing condition, their new job
> wouldn't cover it (for a year?). It's basically a modern day version
> of indentured servitude.

All valid points - but points that can be addressed without the
government nationalizing healthcare, or bankrupting the country with Yet
Another Trillion-Dollar Spend-Fest.

Shit, just make a law that says insurance providers aren't allowed to
refuse coverage for a previously-existing condition *that was previously
covered by another insurer*. This would be revenue-neutral to the
industry as a whole, and as people went back and forth between insurers,
it would sugar out as revenue-neutral even to individual insurers.

The only thing insurers should be able to prevent by "previously
existing" rules is people not insuring themselves and pocketing the
money ... until they discover they're sick or get injured.

> Would the democrats plan be any better. I honestly don't have a clue,
> but given their track record on things like the stimulus, I'm not
> holding my breath. ... but that doesn't keep me from saying that the
> current system is seriously fucked up.

Then we should make a list of the things we feel are "fucked up" and
introduce reform specifically for each point ... rather than this
sweeping reorganization of the whole thing. Democrats always think in
terms of whole-country giganticious monstrosities instead of just enough
reform to address specific concerns.


--
Giftzwerg
***
"Surprise, surprise - that somebody who shouts "Allahu Akbar" as he
shoots up a room of soldiers might have Islamist motives in doing that."
- Charles Krauthammer

Briarroot

11/11/2009 5:38:00 PM

0

Shawn K. wrote:
> On Nov 10, 1:28 pm, Giftzwerg <giftzwerg...@hotmail.com> wrote:
>> In article <34743cc4-7688-4e50-9884-3499730a57b0
>> @t2g2000yqn.googlegroups.com>, eddyster...@hotmail.com says...
>>
>> The silly Obamacare proposal - *whatever it is* - still has a major
>> hurdle; TIME. The Dems rushed this 2,000 page monstrosity through the
>> House ... but the Senate doesn't work like that, and voters are going to
>> - finally! - see this shitheap of a bill in all its sprawling horror.
>>
>> And that don't work in the Dems' favor. In 2,000 pages of bullshit
>> whelped by Granny Botox, trust me; there will be *much* to dislike.
>
> I'm curious as to how you could claim to not know what was in a bill
> and then immediately proclaim it a "shitheap" and a "sprawling
> horrow".
>
> No matter, rather than wonder what it is, you and any other voter
> could read it:
> http://thomas.loc.gov/cgi-bin/query/z?c11...:
>

Why should Gifty read it when even those who are tasked with voting on
it won't?

"I don't expect to actually read the legislative language [of the health
care bill] 'cause reading the legislative language is among the more
confusing things I've ever done in my life." - Senator Thomas Carper (D-DE)




--
"Can Washington Make You Buy Health Insurance? Yes, yes, says White
House Press Secretary Robert Gibbs. Congress has the power to make
everyone buy health insurance. 'I don't believe there's a lot of case
law that would demonstrate the veracity' of comments to the contrary.
Thank you, Mr. Justice Gibbs. We'll see about all that when -- if - the
matter of Congress' power over private commercial judgments of this
nature gets to the U.S. Supreme Court. Meanwhile the knock-down,
drag-out over health insurance 'reform' shouldn't be allowed to fuzz up
another immensely vital question; to wit, how in James Madison's name
have we reached the point that Congress can so much as contemplate
telling you, and you, and you, and all of us that we'll buy health
insurance, like it or not, Buster? Why do we have to? Because the
government says so, isn't that reason enough? For Mr. Justice Gibbs, and
the people who employ him, it is. Just about anything Congress decides
to do in the name of uplift seems to be constitutional: In other words,
in accord with written stipulations as to what the national government
may and may not do. Several problems arise concerning this fine theory:
- It's nonsense. It contravenes the whole constitutional concept of
divided powers: particular functions reserved to particular branches of
government. And other powers divided between states and the national
government. - It threatens liberty. A government that knows no limits to
its power can be counted on to step more and more heavily on citizens'
rights and privileges. All for the 'general good' naturally! -- It
divides the citizens. On the one hand, those who want particular favors
from government; on the other hand, those who deny that government has
the right to dispense such favors. The Obama administration, which
desperately wants health care to pass, brushes off such concerns as
cranky and relevant mainly to wild-eyed Limbaugh and Palin fans, when in
fact concerns about the rightful exercise of government power should
inform every legislative debate. Those it doesn't inform are likely to
end badly. Majority support of this or that initiative doesn't
legitimize the initiative." - William Murchison, senior fellow at the
Texas Public Policy Foundation

Briarroot

11/11/2009 5:50:00 PM

0

Shawn K. wrote:
> I should also mention that I don't mean to single you out, Giftzwerg.
> Your post was just indicative of something that's been on my mind. The
> amount of F.U.D. that I've seen flying around this whole business just
> drives me crazy. So many people are intent on just selling some party
> line (Democrats and Republicans alike) that honest, coherent
> conversation and debate becomes really difficult to accomplish.
>

Great. Now suppose you enlighten us on those points of HR 3962 (the
Pelosi Bill) that you think will succeed in lowering the cost of health
care? See, that's the sticking point. The whole idea is not to extend
health insurance to people who don't have it and most of whom don't want
it. And make no mistake, the vast majority of the middle class doesn't
really give a shit about the poor, they want to lower *their* health
care costs. Is this bill gonna do that? How?

*My* principle beef is with the individual mandate, which unfortunately
exists in every other healthcare 'reform' bill that I've heard being
talked about in this session of Congress. I wouldn't care if Congress
extended Medicaid coverage to include everyone whose annual income is
below the poverty line (which is what they *should* be doing, by the
way, instead of to shove this fiasco down our throats). I don't care
about the high cost of buying health insurance because I'm not one of
their customers and don't plan to ever be. I care about my personal
freedom and about an over-arching government that seems intent on
further empowering itself at my expense. Ya got me?



--
"Can Washington Make You Buy Health Insurance? Yes, yes, says White
House Press Secretary Robert Gibbs. Congress has the power to make
everyone buy health insurance. 'I don't believe there's a lot of case
law that would demonstrate the veracity' of comments to the contrary.
Thank you, Mr. Justice Gibbs. We'll see about all that when -- if - the
matter of Congress' power over private commercial judgments of this
nature gets to the U.S. Supreme Court. Meanwhile the knock-down,
drag-out over health insurance 'reform' shouldn't be allowed to fuzz up
another immensely vital question; to wit, how in James Madison's name
have we reached the point that Congress can so much as contemplate
telling you, and you, and you, and all of us that we'll buy health
insurance, like it or not, Buster? Why do we have to? Because the
government says so, isn't that reason enough? For Mr. Justice Gibbs, and
the people who employ him, it is. Just about anything Congress decides
to do in the name of uplift seems to be constitutional: In other words,
in accord with written stipulations as to what the national government
may and may not do. Several problems arise concerning this fine theory:
- It's nonsense. It contravenes the whole constitutional concept of
divided powers: particular functions reserved to particular branches of
government. And other powers divided between states and the national
government. - It threatens liberty. A government that knows no limits to
its power can be counted on to step more and more heavily on citizens'
rights and privileges. All for the 'general good' naturally! -- It
divides the citizens. On the one hand, those who want particular favors
from government; on the other hand, those who deny that government has
the right to dispense such favors. The Obama administration, which
desperately wants health care to pass, brushes off such concerns as
cranky and relevant mainly to wild-eyed Limbaugh and Palin fans, when in
fact concerns about the rightful exercise of government power should
inform every legislative debate. Those it doesn't inform are likely to
end badly. Majority support of this or that initiative doesn't
legitimize the initiative." - William Murchison, senior fellow at the
Texas Public Policy Foundation

Briarroot

11/11/2009 5:54:00 PM

0

eddysterckx@hotmail.com wrote:
> On Nov 11, 4:21 am, "Shawn K." <3point1415926...@gmail.com> wrote:
>> I should also mention that I don't mean to single you out, Giftzwerg.
>> Your post was just indicative of something that's been on my mind. The
>> amount of F.U.D. that I've seen flying around this whole business just
>> drives me crazy. So many people are intent on just selling some party
>> line (Democrats and Republicans alike) that honest, coherent
>> conversation and debate becomes really difficult to accomplish.
>
> I live in a Universal Healthcare country - a question I've posed here
> before is : show me one - 1 - example of a country where there's UHC
> and it's either better or cheaper than what you guys have today.
>
> Or conversely : show me a government run organization that works
> better and cheaper than its private sector counterpart.
>
> Oh, well, don't worry about it, once the money runs out for the U in
> UHC you'll see what I mean.
>

I don't think Obama knows how wealth in generated. He's never done
anything but be a "community organizer;" one of those who get rich by
helping poor people ask for and receive government hand-outs. He
apparently thinks there's an endless supply of money that the government
can just print as necessary. (and it sure seems like some of the people
at the Fed and the Treasury think that too! <gulp>)



--
"Can Washington Make You Buy Health Insurance? Yes, yes, says White
House Press Secretary Robert Gibbs. Congress has the power to make
everyone buy health insurance. 'I don't believe there's a lot of case
law that would demonstrate the veracity' of comments to the contrary.
Thank you, Mr. Justice Gibbs. We'll see about all that when -- if - the
matter of Congress' power over private commercial judgments of this
nature gets to the U.S. Supreme Court. Meanwhile the knock-down,
drag-out over health insurance 'reform' shouldn't be allowed to fuzz up
another immensely vital question; to wit, how in James Madison's name
have we reached the point that Congress can so much as contemplate
telling you, and you, and you, and all of us that we'll buy health
insurance, like it or not, Buster? Why do we have to? Because the
government says so, isn't that reason enough? For Mr. Justice Gibbs, and
the people who employ him, it is. Just about anything Congress decides
to do in the name of uplift seems to be constitutional: In other words,
in accord with written stipulations as to what the national government
may and may not do. Several problems arise concerning this fine theory:
- It's nonsense. It contravenes the whole constitutional concept of
divided powers: particular functions reserved to particular branches of
government. And other powers divided between states and the national
government. - It threatens liberty. A government that knows no limits to
its power can be counted on to step more and more heavily on citizens'
rights and privileges. All for the 'general good' naturally! -- It
divides the citizens. On the one hand, those who want particular favors
from government; on the other hand, those who deny that government has
the right to dispense such favors. The Obama administration, which
desperately wants health care to pass, brushes off such concerns as
cranky and relevant mainly to wild-eyed Limbaugh and Palin fans, when in
fact concerns about the rightful exercise of government power should
inform every legislative debate. Those it doesn't inform are likely to
end badly. Majority support of this or that initiative doesn't
legitimize the initiative." - William Murchison, senior fellow at the
Texas Public Policy Foundation

Ray O'Hara

11/12/2009 2:04:00 AM

0


"Briarroot" <briarroot@gmail.com> wrote in message
news:SumdnXKKS6a9Z2fXnZ2dnUVZ_hOdnZ2d@posted.toastnet...
> eddysterckx@hotmail.com wrote:
>> On Nov 11, 4:21 am, "Shawn K." <3point1415926...@gmail.com> wrote:
>>> I should also mention that I don't mean to single you out, Giftzwerg.
>>> Your post was just indicative of something that's been on my mind. The
>>> amount of F.U.D. that I've seen flying around this whole business just
>>> drives me crazy. So many people are intent on just selling some party
>>> line (Democrats and Republicans alike) that honest, coherent
>>> conversation and debate becomes really difficult to accomplish.
>>
>> I live in a Universal Healthcare country - a question I've posed here
>> before is : show me one - 1 - example of a country where there's UHC
>> and it's either better or cheaper than what you guys have today.
>>
>> Or conversely : show me a government run organization that works
>> better and cheaper than its private sector counterpart.
>>
>> Oh, well, don't worry about it, once the money runs out for the U in
>> UHC you'll see what I mean.
>>
>
> I don't think Obama knows how wealth in generated. He's never done
> anything but be a "community organizer;" one of those who get rich by
> helping poor people ask for and receive government hand-outs. He
> apparently thinks there's an endless supply of money that the government
> can just print as necessary. (and it sure seems like some of the people
> at the Fed and the Treasury think that too! <gulp>)
>

when Bush 1 talked about 1000 points of light all you fascists cooed in
approval
when someone actually provided one of those points you make fun of him.
what a hypocrite you fascists are.

and what do you do to generate wealth? Obama grew up a half-black child of a
single mother who made it to Harvard, got a law degree and became President
of the United States.
what can you do to match that. Obama is an "Only in America" success story.
you always attack those who don't succeed, yet you worship those who were
born to it and denigrate those who do overcome the odds.
You are a hypocrite.

and as they said about your hero Bush," he was born on 3rd base and acted
like he hit a triple"


Ray O'Hara

11/12/2009 2:09:00 AM

0


"Briarroot" <briarroot@gmail.com> wrote in message
news:TKWdncHTHLbcZGfXnZ2dnUVZ_rydnZ2d@posted.toastnet...
> Shawn K. wrote:
>> I should also mention that I don't mean to single you out, Giftzwerg.
>> Your post was just indicative of something that's been on my mind. The
>> amount of F.U.D. that I've seen flying around this whole business just
>> drives me crazy. So many people are intent on just selling some party
>> line (Democrats and Republicans alike) that honest, coherent
>> conversation and debate becomes really difficult to accomplish.
>>
>
> Great. Now suppose you enlighten us on those points of HR 3962 (the
> Pelosi Bill) that you think will succeed in lowering the cost of health
> care? See, that's the sticking point. The whole idea is not to extend
> health insurance to people who don't have it and most of whom don't want
> it. And make no mistake, the vast majority of the middle class doesn't
> really give a shit about the poor, they want to lower *their* health care
> costs. Is this bill gonna do that? How?
>
> *My* principle beef is with the individual mandate, which unfortunately
> exists in every other healthcare 'reform' bill that I've heard being
> talked about in this session of Congress. I wouldn't care if Congress
> extended Medicaid coverage to include everyone whose annual income is
> below the poverty line (which is what they *should* be doing, by the way,
> instead of to shove this fiasco down our throats). I don't care about the
> high cost of buying health insurance because I'm not one of their
> customers and don't plan to ever be. I care about my personal freedom and
> about an over-arching government that seems intent on further empowering
> itself at my expense. Ya got me?
>

you're a little premature with the nopes.


here is a pic of Bobby Jindal handing out stimulus money
of course he went on TV attacking the stimulus bill and then made a big
photo op of handing it out while taking full credit for getting the money.
http://the44diaries.files.wordpress.com/2009/09/jindalst...


eddysterckx@hotmail.com

11/12/2009 8:08:00 AM

0

On 11 nov, 16:28, Frank E <fakeaddr...@hotmail.com> wrote:

> Would you be more comfortable with a system that was cheaper but where
> you didn't have any coverage if you lost your job, or couldn't change
> your job because you had a medical problem that wouldn't be covered in
> your new job?

Would be easy to legislate - just like you (over here) keep your
pension fund if you change employer. Takes a 1 line law.

> Once you strip through all the BS from the republicans and democrats,
> that's the basic question that it comes down to.

I don't do, nor get, the party politics behind this - I just look at
it from a value for money pov and the UHC over here just sucks in that
aspect.

> I'm trying to picture what a 'for profit' fire or police department
> would look like.

Easy. Fire departments started out as private business initiatives in
the Renaissance. If your house was on fire, they arrived, you haggled
over the price and then they started (or not) putting out the fire.

You know what the best fire department is, less than 1 km from my
house ? The private fire department from the chemical (paint) plant
down the road. I wonder why they think they need a private fire
department when the city's one is within 3 minutes of normal driving ?
Same for the airport 5 km from my place.

As to police departments ... I spend the summer in the US. Never in my
life have I seen so many rent-a-cops and gated communities. Clearly a
lot of your country-folk think they not only need, but can also afford
private police.

>I don't think it would work too well. How about big
> infrastructure projects like dams, bridges or airports? Driving
> wouldn't be much fun for me if every road where a toll road.

Almost all French highways are/were build by private companies and are
toll roads. The French largely prefer that over paying twice/thrice
the money in taxes to build and maintain government-run "free" roads.

> How about
> national defense, how exactly do you picture a 'for profit' military?

LOL - there are currently 20,000 private military contractors in
Iraq.

.... and you forgot education. Public education still beating private
schools in quality ? or not ?

> I can think of a lot of areas where maximum profit shouldn't be the
> overriding concern.

Agreed. But that's not what I said - I said maximum value for money.
And you *never* get that by letting the government run something. Some
things do cost a lot of money to run properly, and as a society we
should spend money on education, public safety and other stuff. But we
need to spend it wisely, which is something entirely different from
creating 2000 pages of legislation and an army of bureaucrats to
oversee things.

> Not necessarily run by the governent but at least heavily
> regulated by it.

Make it smart & small footprint, not heavily regulated, and I might
agree

> we have only ourselves to blame for electing the politicians that we
> do.

Every country has the politicians it deserves.

That's basically why I think the US should get out of Iraq and
Afghanistan too. Let them stew in their own fanatical religious fat
for a couple of centuries more.

Greetz,

Eddy Sterckx

eddysterckx@hotmail.com

11/12/2009 10:21:00 AM

0

On 12 nov, 00:52, Giftzwerg <giftzwerg...@hotmail.com> wrote:
> In article <hdfgs1$e9...@ftupet.ftupet.com>, m...@shawnritchie.com says...
>
> > >> You know what I wonder? What kind of rude gasbag thinks it's cool to
> > >> make others have to scroll past a humongous fucking .sig file every time
> > >> you post? That's what I wonder.
>
> > > Beats having to scroll past whole posts of your inane twaddle.l
>
> > Awwww. And here I thought the last few times I posted you and I were
> > having a nice discussion about stuff (which we were).
>
> > Briar's .sig sucks, there's no two ways about it.
>
> Who cares?  
>
> A .sig comes at the *end* of a post.  Duh.  It doesn't have to be
> "scrolled past" as you retardedly claim.  Just read the post and ignore
> the .sig.  Stop scrolling when you get to the end of the text, and you
> won't have to wet yourself about the .sig.  You'll *save* time!
>
> What the fuck is the problem?

Google's Groups interface shows up to 10 posts at a time, so you can
scroll past one post to the next - makes for very fast reading - but
then you also have to scroll past the sig to get to the real data of
the posts.

Doesn't bother me because I'm a curious bunny so I tend to diagonally
read them and sometimes even comment on them though that used to be
frowned upon in ancient UseNet days.

Greetz,

Eddy Sterckx