You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-9Lines changed: 72 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
## Information
5
5
6
6
<table>
7
-
<tr>
7
+
<tr>
8
8
<td>Package</td><td>vinyl</td>
9
9
</tr>
10
10
<tr>
@@ -38,42 +38,42 @@ var coffeeFile = new File({
38
38
39
39
#### options.cwd
40
40
41
-
Type: `String`
41
+
Type: `String`
42
42
Default: `process.cwd()`
43
43
44
44
#### options.base
45
45
46
46
Used for relative pathing. Typically where a glob starts.
47
47
48
-
Type: `String`
48
+
Type: `String`
49
49
Default: `options.cwd`
50
50
51
51
#### options.path
52
52
53
53
Full path to the file.
54
54
55
-
Type: `String`
55
+
Type: `String`
56
56
Default: `undefined`
57
57
58
58
#### options.history
59
59
60
60
Path history. Has no effect if `options.path` is passed.
61
61
62
-
Type: `Array`
62
+
Type: `Array`
63
63
Default: `options.path ? [options.path] : []`
64
64
65
65
#### options.stat
66
66
67
67
The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.
68
68
69
-
Type: `fs.Stats`
69
+
Type: `fs.Stats`
70
70
Default: `null`
71
71
72
72
#### options.contents
73
73
74
74
File contents.
75
75
76
-
Type: `Buffer, Stream, or null`
76
+
Type: `Buffer, Stream, or null`
77
77
Default: `null`
78
78
79
79
### isBuffer()
@@ -117,6 +117,10 @@ Returns a pretty String interpretation of the File. Useful for console.log.
117
117
118
118
Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.
119
119
120
+
### history
121
+
122
+
Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
123
+
120
124
### relative
121
125
122
126
Returns path.relative for the file base and file path.
@@ -133,9 +137,68 @@ var file = new File({
133
137
console.log(file.relative); // file.coffee
134
138
```
135
139
136
-
### history
140
+
### dirname
137
141
138
-
Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.
0 commit comments