// Remove implements InodeOperations.RemoveDirectory.
Remove implements InodeOperations.RemoveDirectory.
// Remove implements InodeOperations . RemoveDirectory .
func (i *inodeOperations) RemoveDirectory(ctx context.Context, dir *fs.Inode, name string) error {
	if len(name) > maxFilenameLen {
		return syserror.ENAMETOOLONG
	}
	if err := i.fileState.file.unlinkAt(ctx, name, 0x200); err != nil {
		return err
	}
	if i.session().cachePolicy.cacheUAttrs(dir) {
		i.cachingInodeOps.DecLinks(ctx)
	}
	if i.session().cachePolicy.cacheReaddir() {
		i.markDirectoryDirty()
	}
	return nil
}
func ( i * inodeOperations ) RemoveDirectory ( ctx context . Context , dir * fs . Inode , name string ) error { if len ( name ) > maxFilenameLen { return syserror . ENAMETOOLONG } if err := i . fileState . file . unlinkAt ( ctx , name , 0x200 ) ; err != nil { return err } if i . session ( ) . cachePolicy . cacheUAttrs ( dir ) { i . cachingInodeOps . DecLinks ( ctx ) } if i . session ( ) . cachePolicy . cacheReaddir ( ) { i . markDirectoryDirty ( ) } return nil }
Remove implements InodeOperations.RemoveDirectory.
Remove implements InodeOperations . RemoveDirectory .
// 0x200 = AT_REMOVEDIR. // Decrease link count and updates atime. // Invalidate readdir cache.