func (imd *Directory) AddFileDevice(name string, content []byte, permissions os.FileMode, deviceInfo fs.DeviceInfo) *File {
	imd, name = imd.resolveSubdir(name)
	file := &File{
		entry: entry{
			name:    name,
			mode:    permissions,
			size:    int64(len(content)),
			device:  deviceInfo,
			modTime: DefaultModTime,
		},
		source: func() (ReaderSeekerCloser, error) {
			return readerSeekerCloser{bytes.NewReader(content)}, nil
		},
	}

	imd.addChild(file)

	return file
}
// AddFileDevice adds a mock file with the specified name, content, permissions, and device info.
AddFileDevice adds a mock file with the specified name, content, permissions, and device info.
// AddFileDevice adds a mock file with the specified name content permissions and device info .
func (imd *Directory) AddFileDevice(name string, content []byte, permissions os.FileMode, deviceInfo fs.DeviceInfo) *File {
	imd, name = imd.resolveSubdir(name)
	file := &File{
		entry: entry{
			name:    name,
			mode:    permissions,
			size:    int64(len(content)),
			device:  deviceInfo,
			modTime: DefaultModTime,
		},
		source: func() (ReaderSeekerCloser, error) {
			return readerSeekerCloser{bytes.NewReader(content)}, nil
		},
	}
	imd.addChild(file)
	return file
}
func ( imd * Directory ) AddFileDevice ( name string , content [ ] byte , permissions os . FileMode , deviceInfo fs . DeviceInfo ) * File { imd , name = imd . resolveSubdir ( name ) file := & File { entry : entry { name : name , mode : permissions , size : int64 ( len ( content ) ) , device : deviceInfo , modTime : DefaultModTime , } , source : func ( ) ( ReaderSeekerCloser , error ) { return readerSeekerCloser { bytes . NewReader ( content ) } , nil } , } imd . addChild ( file ) return file }
AddFileDevice adds a mock file with the specified name, content, permissions, and device info.
AddFileDevice adds a mock file with the specified name content permissions and device info .