Documentation
¶
Overview ¶
Package filesystem exposes the core java.io.File and java.nio.file pathname surface over Go's portable os/path/filepath APIs.
Index ¶
- func CreateDirectories(path any, _ ...any) any
- func Delete(path any)
- func Exists(path any, _ ...any) bool
- func GetLastModifiedTime(path any) time.Time
- func GetPath(args ...any) any
- func IsDirectory(path any, _ ...any) bool
- func IsRegularFile(path any, _ ...any) bool
- func NewFile(args ...any) any
- func ReadString(path any, _ ...any) string
- func Size(path any) int64
- func WriteString(path, content any, _ ...any) any
- type File
- func (f *File) AbsoluteFile() *File
- func (f *File) AbsolutePath() string
- func (f *File) CanRead() bool
- func (f *File) CanWrite() bool
- func (f *File) CanonicalFile() *File
- func (f *File) CanonicalPath() string
- func (f *File) Delete() bool
- func (f *File) DeleteOnExit()
- func (f *File) Exists() bool
- func (f *File) GetAbsoluteFile() *File
- func (f *File) GetAbsolutePath() string
- func (f *File) GetCanonicalFile() *File
- func (f *File) GetCanonicalPath() string
- func (f *File) GetName() string
- func (f *File) GetParent() string
- func (f *File) GetParentFile() *File
- func (f *File) GetPath() string
- func (f *File) IsAbsolute() bool
- func (f *File) IsDirectory() bool
- func (f *File) IsFile() bool
- func (f *File) LastModified() int64
- func (f *File) Length() int64
- func (f *File) List() []string
- func (f *File) ListFiles() []*File
- func (f *File) Mkdir() bool
- func (f *File) Mkdirs() bool
- func (f *File) Name() string
- func (f *File) Parent() string
- func (f *File) ParentFile() *File
- func (f *File) Path() string
- func (f *File) ResolveFieldOrMethod(name string) (any, bool)
- func (f *File) String() string
- func (f *File) ToPath() *Path
- func (f *File) ToString() string
- type Files
- type Path
- func (p *Path) FileName() *Path
- func (p *Path) GetFileName() *Path
- func (p *Path) GetParent() *Path
- func (p *Path) IsAbsolute() bool
- func (p *Path) Normalize() *Path
- func (p *Path) Parent() *Path
- func (p *Path) Resolve(other any) *Path
- func (p *Path) String() string
- func (p *Path) ToAbsolutePath() *Path
- func (p *Path) ToFile() *File
- func (p *Path) ToString() string
- type Paths
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirectories ¶
func GetLastModifiedTime ¶
func IsDirectory ¶
func IsRegularFile ¶
func ReadString ¶
func WriteString ¶
Types ¶
type File ¶
type File struct{ Pathname string }
func CreateTempFile ¶ added in v0.7.5
func (*File) AbsoluteFile ¶
func (*File) AbsolutePath ¶
func (*File) CanonicalFile ¶
func (*File) CanonicalPath ¶
func (*File) DeleteOnExit ¶ added in v0.7.6
func (f *File) DeleteOnExit()
DeleteOnExit accepts Java's lifecycle hint. Gobb processes are short-lived and do not expose a JVM-style shutdown-hook registry, so this is best-effort.
func (*File) GetAbsoluteFile ¶
func (*File) GetAbsolutePath ¶
func (*File) GetCanonicalFile ¶
func (*File) GetCanonicalPath ¶
func (*File) GetParentFile ¶ added in v0.7.5
func (*File) IsAbsolute ¶ added in v0.7.6
func (*File) IsDirectory ¶
func (*File) LastModified ¶
func (*File) ParentFile ¶ added in v0.7.5
func (*File) ResolveFieldOrMethod ¶ added in v0.7.6
type Path ¶
type Path struct{ Pathname string }