Documentation
¶
Overview ¶
Package fs provides representation of GN input files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizePath ¶
NormalizePath collapses "." and sequential "/"s and evaluates "..". |path| may be system-absolute, source-absolute, or relative. |path| will retain its relativity, use NormalizePathWithSourceRoot if a different source root is desired.
func NormalizePathWithSourceRoot ¶
NormalizePathWithSourceRoot is same as NormalizePath, but if |path| is source-absolute and |sourceRoot| is non-empty, |path| may be system absolute after this function returns, if |path| references the filesystem outside of |sourceRoot| (ex. path = "//.."). In this case on Windows, |path| will have a leading slash. Otherwise, |path| will retain its relativity. |sourceRoot| must not end with a slash.
Types ¶
type InputFile ¶
type InputFile struct { // Name is the virtual name for representing this file. This does not take into // account whether the file was loaded from the secondary source tree (see // BuildSettings secondarySourcePath). Name SourceFile // contains filtered or unexported fields }
InputFile represents a lazy-loadable file.
func NewInputFile ¶
NewInputFile creates an input file from provided path.
type SourceFile ¶
type SourceFile struct {
// contains filtered or unexported fields
}
SourceFile represents a file within the source tree. Always begins in a slash, never ends in one.
func (SourceFile) Filename ¶
func (s SourceFile) Filename() string
Filename returns the source file name.