Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
###########################################################################/**
|
|
2 |
# @RdocClass RspPage
|
|
3 |
#
|
|
4 |
# @title "The RspPage class"
|
|
5 |
#
|
|
6 |
# \description{
|
|
7 |
# @classhierarchy
|
|
8 |
# }
|
|
9 |
#
|
|
10 |
# @synopsis
|
|
11 |
#
|
|
12 |
# \arguments{
|
|
13 |
# \item{pathname}{A @character string.}
|
|
14 |
# \item{...}{Not used.}
|
|
15 |
# }
|
|
16 |
#
|
|
17 |
# \section{Fields and Methods}{
|
|
18 |
# @allmethods
|
|
19 |
# }
|
|
20 |
#
|
|
21 |
# @author
|
|
22 |
# @keyword internal
|
|
23 |
#*/###########################################################################
|
|
24 |
setConstructorS3("RspPage", function(pathname=NULL, ...) { |
|
25 |
# Argument 'pathname':
|
|
26 | 1 |
pathname <- Arguments$getCharacter(pathname) |
27 |
|
|
28 | 1 |
extend(Object(), "RspPage", |
29 | 1 |
pathname = pathname, |
30 |
...
|
|
31 |
)
|
|
32 |
})
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
#########################################################################/**
|
|
37 |
# @RdocMethod getPath
|
|
38 |
#
|
|
39 |
# @title "Gets the path of the directory of the current RSP file"
|
|
40 |
#
|
|
41 |
# \description{
|
|
42 |
# @get "title".
|
|
43 |
# }
|
|
44 |
#
|
|
45 |
# @synopsis
|
|
46 |
#
|
|
47 |
# \arguments{
|
|
48 |
# \item{...}{Not used.}
|
|
49 |
# }
|
|
50 |
#
|
|
51 |
# \value{
|
|
52 |
# Returns a @character string.
|
|
53 |
# }
|
|
54 |
#
|
|
55 |
# @author
|
|
56 |
#
|
|
57 |
# \seealso{
|
|
58 |
# @seeclass
|
|
59 |
# }
|
|
60 |
#
|
|
61 |
# @keyword IO
|
|
62 |
#*/#########################################################################
|
|
63 |
setMethodS3("getPath", "RspPage", function(this, ...) { |
|
64 |
getParent(this$pathname) |
|
65 |
}, createGeneric=FALSE) |
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
#########################################################################/**
|
|
70 |
# @RdocMethod getName
|
|
71 |
#
|
|
72 |
# @title "Gets the (base)name of the current RSP file"
|
|
73 |
#
|
|
74 |
# \description{
|
|
75 |
# @get "title".
|
|
76 |
# }
|
|
77 |
#
|
|
78 |
# @synopsis
|
|
79 |
#
|
|
80 |
# \arguments{
|
|
81 |
# \item{...}{Not used.}
|
|
82 |
# }
|
|
83 |
#
|
|
84 |
# \value{
|
|
85 |
# Returns a @character string.
|
|
86 |
# }
|
|
87 |
#
|
|
88 |
# @author
|
|
89 |
#
|
|
90 |
# \seealso{
|
|
91 |
# @seeclass
|
|
92 |
# }
|
|
93 |
#
|
|
94 |
# @keyword IO
|
|
95 |
#*/#########################################################################
|
|
96 |
setMethodS3("getName", "RspPage", function(this, ...) { |
|
97 |
basename(this$pathname) |
|
98 |
}, createGeneric=FALSE) |
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
#########################################################################/**
|
|
103 |
# @RdocMethod getAbsolutePath
|
|
104 |
#
|
|
105 |
# @title "Gets the absolute pathname to the current RSP file"
|
|
106 |
#
|
|
107 |
# \description{
|
|
108 |
# @get "title".
|
|
109 |
# }
|
|
110 |
#
|
|
111 |
# @synopsis
|
|
112 |
#
|
|
113 |
# \arguments{
|
|
114 |
# \item{...}{Not used.}
|
|
115 |
# }
|
|
116 |
#
|
|
117 |
# \value{
|
|
118 |
# Returns a @character string.
|
|
119 |
# }
|
|
120 |
#
|
|
121 |
# @author
|
|
122 |
#
|
|
123 |
# \seealso{
|
|
124 |
# @seeclass
|
|
125 |
# }
|
|
126 |
#
|
|
127 |
# @keyword IO
|
|
128 |
#*/#########################################################################
|
|
129 |
setMethodS3("getAbsolutePath", "RspPage", function(this, ...) { |
|
130 |
getAbsolutePath(this$pathname) |
|
131 |
}, createGeneric=FALSE) |
Read our documentation on viewing source code .