- プロファイル: new VFile(arg? : (Options | string | buffer | VFile) ) : VFile
引数:
- arg: Options → 正規の引数
- arg: (string | Buffer ) → arg := {value: arg} と再設定
- arg:VFile → シャローコピーを返す。
- arg: undefined → おそらくデフォルトのVFileを返す。
オペレーションまたはプロパティ:
- value : (Buffer | string | null) — Raw value.
- cwd: string — Base of path. Defaults to process.cwd().
- path: string? — Path of vfile. Cannot be nullified. You can set a file URL (a URL object with a file: protocol) which will be turned into a path with url.fileURLToPath.
- basename: string? — Current name (including extension) of vfile. Cannot contain path separators. Cannot be nullified either (use file.path = file.dirname instead).
- stem: string? — Name (without extension) of vfile. Cannot be nullified, and cannot contain path separators.
- extname: string? — Extension (with dot) of vfile. Cannot be set if there’s no path yet and cannot contain path separators.
- dirname: string? — Path to parent directory of vfile. Cannot be set if there’s no path yet.
- history: Array
— List of file-paths the file moved between. - messages: Array
— List of messages associated with the file. - data: Object? — Place to store custom information. It’s OK to store custom data directly on the vfile, moving it to data gives a little more privacy.