Lines Matching refs:os
53 Lstat(path string) (stats os.FileInfo, err error)
54 Stat(path string) (stats os.FileInfo, err error)
57 InodeNumber(info os.FileInfo) (number uint64, err error)
58 DeviceNumber(info os.FileInfo) (number uint64, err error)
59 PermTime(info os.FileInfo) (time time.Time, err error)
63 WriteFile(path string, data []byte, perm os.FileMode) (err error)
75 Mode() os.FileMode // the file type encoded as an os.FileMode
81 mode os.FileMode
85 var _ DirEntryInfo = os.FileInfo(nil)
88 func (d *dirEntryInfo) Mode() os.FileMode { return d.mode }
97 func (osFs) Open(name string) (io.ReadCloser, error) { return os.Open(name) }
99 func (osFs) Lstat(path string) (stats os.FileInfo, err error) {
100 return os.Lstat(path)
103 func (osFs) Stat(path string) (stats os.FileInfo, err error) {
104 return os.Stat(path)
120 return os.Rename(oldPath, newPath)
123 func (osFs) WriteFile(path string, data []byte, perm os.FileMode) error {
128 return os.Remove(path)
132 return os.RemoveAll(path)
142 hostname, err := os.Hostname()
263 return "", &os.PathError{
274 return "", &os.PathError{
282 return "", &os.PathError{
305 return nil, &os.PathError{
308 Err: os.ErrInvalid,
312 return nil, &os.PathError{
315 Err: os.ErrNotExist,
319 return nil, &os.PathError{
341 return nil, &os.PathError{
344 Err: os.ErrNotExist,
384 mode os.FileMode
397 func (m *mockFileInfo) Mode() os.FileMode {
406 return m.mode&os.ModeDir != 0
419 mode: os.ModeDir,
444 mode: os.ModeSymlink,
450 func (m *MockFs) Lstat(path string) (stats os.FileInfo, err error) {
486 return nil, &os.PathError{
489 Err: os.ErrNotExist,
493 func (m *MockFs) Stat(path string) (stats os.FileInfo, err error) {
503 func (m *MockFs) InodeNumber(info os.FileInfo) (number uint64, err error) {
510 func (m *MockFs) DeviceNumber(info os.FileInfo) (number uint64, err error) {
517 func (m *MockFs) PermTime(info os.FileInfo) (when time.Time, err error) {
543 return nil, &os.PathError{
577 return &os.PathError{
580 Err: os.ErrNotExist,
584 return &os.PathError{
599 return &os.PathError{
602 Err: os.ErrNotExist,
606 return &os.PathError{
622 return &os.PathError{
625 Err: os.ErrNotExist,
636 return &os.PathError{
644 return &os.PathError{
685 func (m *MockFs) WriteFile(filePath string, data []byte, perm os.FileMode) error {
693 return &os.PathError{
696 Err: os.ErrNotExist,
700 return &os.PathError{
715 return &os.PathError{
779 return nil, &os.PathError{
791 return nil, &os.PathError{
794 Err: os.ErrExist,
802 return nil, &os.PathError{
805 Err: os.ErrNotExist,
824 return &os.PathError{
827 Err: os.ErrNotExist,
831 return &os.PathError{
839 return &os.PathError{
842 Err: os.ErrInvalid,
851 return &os.PathError{
854 Err: os.ErrNotExist,
872 return &os.PathError{
899 return &os.PathError{
902 Err: os.ErrNotExist,
906 return &os.PathError{
921 return &os.PathError{
924 Err: os.ErrNotExist,
937 readErr = os.ErrPermission
953 return &os.PathError{