repo.or.cz
/
rubygit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
few hours work - diff is done
[rubygit.git]
/
lib
/
git
/
path.rb
blob
18845fa49d84d657a5aa3f39bcd4a950da68b3d4
1
module Git
2
class Path
3
4
attr_accessor :path
5
6
def initialize(path, check_path = true)
7
if !check_path || File.exists?(path)
8
@path = path
9
else
10
raise ArgumentError, "path does not exist", path
11
end
12
end
13
14
def readable?
15
File.readable?(@path)
16
end
17
18
def writable?
19
File.writable?(@path)
20
end
21
22
end
23
end